|
From: <dai...@us...> - 2013-09-28 10:36:43
|
Revision: 6340
http://sourceforge.net/p/web-erp/reponame/6340
Author: daintree
Date: 2013-09-28 10:36:40 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
WH HSN: fix regular expression to prevent back slashes and double quotes
Modified Paths:
--------------
trunk/doc/Change.log
trunk/javascripts/MiscFunctions.js
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2013-09-28 05:16:53 UTC (rev 6339)
+++ trunk/doc/Change.log 2013-09-28 10:36:40 UTC (rev 6340)
@@ -1,5 +1,6 @@
webERP Change Log
+28/9/13 wh_hsn: help with regular expression to trap quotes and backslashes for data-type="no-illegal-chars"
28/9/13 Phil: Followed Exson's example to set pattern to prevent dodgy characters in other scripts that were using a pattern that only allowed [a-zA-Z0-9] thus making it impossible to enter non latin characters.
11/9/13 icedlava: SelectCompletedOrder.php Fix SQL typo.
7/9/13 Exson: using javascript to set the pattern attribute based on a new attribute data-type and first script Stocks.php
Modified: trunk/javascripts/MiscFunctions.js
===================================================================
--- trunk/javascripts/MiscFunctions.js 2013-09-28 05:16:53 UTC (rev 6339)
+++ trunk/javascripts/MiscFunctions.js 2013-09-28 10:36:40 UTC (rev 6340)
@@ -319,7 +319,7 @@
ds[i].onclick=clickDate;
ds[i].onchange=changeDate;
}
- if(ds[i].getAttribute("data-type") == 'no-illegal-chars') ds[i].pattern="(?!^ +$)[^?\'\"+.&\\><]*";
+ if(ds[i].getAttribute("data-type") == 'no-illegal-chars') ds[i].pattern="(?!^ +$)[^?\'\u0022+.&\\\\><]*";
if (ds[i].className=="number") ds[i].onkeypress=rTN;
if (ds[i].className=="integer") ds[i].onkeypress=rTI;
if (ds[i].className=="number"){
|