[Mapbender-commits] r10297 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Oct 23 01:43:29 PDT 2019


Author: hollsandre
Date: 2019-10-23 01:43:28 -0700 (Wed, 23 Oct 2019)
New Revision: 10297

Modified:
   trunk/mapbender/http/javascripts/mod_savewmc.js
Log:
fixed regex by escaping -


Modified: trunk/mapbender/http/javascripts/mod_savewmc.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_savewmc.js	2019-10-21 15:57:49 UTC (rev 10296)
+++ trunk/mapbender/http/javascripts/mod_savewmc.js	2019-10-23 08:43:28 UTC (rev 10297)
@@ -362,8 +362,8 @@
 			attributes.isoTopicCat = isoTopicCat;
 
 			if(attributes.title != ""){
-				if(!attributes.title.match(/^[a-zA-Z0-9.- ]+$/)){
-                               		alert("Allowed characters for title are: A-Z, a-z, 0-9, -, _");
+				if(!attributes.title.match(/^[a-zA-Z0-9\- _]+$/)){
+                               		alert("Allowed characters for title are: A-Z, a-z, 0-9, -, , _");
                                		return;
                         	}
 			}else{
@@ -372,8 +372,8 @@
 			}
 
 			if(attributes.abstract != ""){
-				if(!attributes.abstract.match(/^[a-zA-Z0-9.- ]+$/)){
-                               		alert("Allowed characters for abstract are: A-Z, a-z, 0-9, -, _");
+				if(!attributes.abstract.match(/^[a-zA-Z0-9\- _]+$/)){
+                               		alert("Allowed characters for abstract are: A-Z, a-z, 0-9, -, , _");
                                		return;
 				}
 			}	
@@ -380,8 +380,8 @@
 
 
 			if(attributes.keywords != ""){
-				if(!attributes.keywords.match(/^[a-zA-Z0-9.- ]+$/)){
-                               		alert("Allowed characters for keywords are: A-Z, a-z, 0-9, -, _");
+				if(!attributes.keywords.match(/^[a-zA-Z0-9\- _]+$/)){
+                               		alert("Allowed characters for keywords are: A-Z, a-z, 0-9, -, , _");
                                		return;
 				}
 			}



More information about the Mapbender_commits mailing list