Logi Info Forum Threads    >    Posts


Match quotation marks in javascript regex

Jonas Freiknecht
Germany

03 Feb 2020 07:57 AM
   
This thread is open for replies.
12.6   .NET app   38 views   Subscribe  


Hi, we use the following code in javascript to filter unallowed characters in an InputText.

var name = $("#txtRenameTab").val();
if(name.match(/[\"\'"`´&%$§/\\?<>]/g) != null){
throw("Die Eingabe enthält ein ungültiges Zeichen (\"\'`´&%$§/\\\\?<>)");
}

We want to forbid to enter quotation marks (") but it seems that Logi converts all quotation mark characters into (') characters. In the example above it affects the unicode decimal code " and the " identifier. Both are shown as (') in the source code after the site loads in the browser. How can I make Logi use the (")?



Contact

United States
7900 Westpark Drive
Suite A200
McLean
Virginia, 22102
1-888-564-4965
salesteam@logianalytics.com

United Kingdom
Scott House
The Concourse
Waterloo Station
London, SE1 7LY
020 3103 0306
emea_sales@logianalytics.com

Ireland
20 Harcourt Street
Suite 10
Dublin
D02 H364
3531 400 7506


© Copyright 2020 Logi Analytics, Inc. All Rights Reserved           |          Contact DevNet          |          Site FAQs          |          Terms of Use          |          LogiAnalytics.com