Browse Source

Examples: Fix minor search bugs.

Mugen87 5 years ago
parent
commit
5e06932ae3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      examples/index.html

+ 2 - 1
examples/index.html

@@ -231,6 +231,7 @@
 		function updateFilter() {
 		function updateFilter() {
 
 
 			var v = filterInput.value.trim();
 			var v = filterInput.value.trim();
+			v = v.replace( /\s+/gi, ' ' ); // replace multiple whitespaces with a single one
 
 
 			if ( v !== '' ) {
 			if ( v !== '' ) {
 
 
@@ -340,7 +341,7 @@
 
 
 			if ( p !== - 1 ) {
 			if ( p !== - 1 ) {
 
 
-				return window.location.search.substr( 3 );
+				return decodeURI( window.location.search.substr( 3 ) );
 
 
 			}
 			}