Index: entityreference_view_widget.js
===================================================================
--- entityreference_view_widget.js	(revision 178)
+++ entityreference_view_widget.js	(working copy)
@@ -7,7 +7,7 @@
       // When a pager link is clicked, store its 'page' value in a hidden
       // form element, and submit the form via ajax to trigger the rebuild.
       $('ul.pager a', context).click(function(event) {
-        var match = this.href.match(/page=(.*)/);
+        var match = this.href.match(/page=([0-9]*)/);
         var page = 0;
         if (match) {
           var page = match[1];
@@ -19,7 +19,7 @@
         event.preventDefault();
       });
     }
-  }
+  };
 
   /**
    * Custom tableDrag behavior for the widget.
