Filter backquote from strings possibly used in shell command
Change-Id: Ic4ccf17f5caed5538b4600f39110fcdec251a601
diff --git a/apps/yang/web/src/main/java/org/onosproject/yang/web/YangWebResource.java b/apps/yang/web/src/main/java/org/onosproject/yang/web/YangWebResource.java
index 907e017..26535d0 100644
--- a/apps/yang/web/src/main/java/org/onosproject/yang/web/YangWebResource.java
+++ b/apps/yang/web/src/main/java/org/onosproject/yang/web/YangWebResource.java
@@ -87,10 +87,10 @@
*/
public static String getValidModelId(String id) throws
IllegalArgumentException {
- // checking weather modelId contains the alphanumeric character or not.
+ // checking whether modelId contains the alphanumeric character or not.
if (id.matches(".*[A-Za-z0-9].*")) {
// replacing special characters with '_'
- id = id.replaceAll("[\\s\\/:*?\"\\[\\]<>|$@!#%&(){}';.,-]", "_");
+ id = id.replaceAll("[\\s\\/:*?\"\\[\\]<>|$@!#%&(){}'`;.,-]", "_");
// remove leading and trailing underscore
id = id.replaceAll("^_+|_+$", "");
// replacing the consecutive underscores '_' to single _