diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-05-23 01:16:23 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-05-23 01:16:23 +0000 |
commit | a3e8ca01f6b3a86fc98a1d0554ffddbbd4bec425 (patch) | |
tree | 2f273557a704da91fb1570602976231cec794ab9 /pki/base | |
parent | f70a457fe3d919ed0c54cf9bb2d8812e79c9700e (diff) | |
download | pki-a3e8ca01f6b3a86fc98a1d0554ffddbbd4bec425.tar.gz pki-a3e8ca01f6b3a86fc98a1d0554ffddbbd4bec425.tar.xz pki-a3e8ca01f6b3a86fc98a1d0554ffddbbd4bec425.zip |
Bugzilla bug #488303
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@486 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base')
-rw-r--r-- | pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java index 4a17b112..b3d50c9f 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java +++ b/pki/base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java @@ -323,7 +323,7 @@ public class ProfileServlet extends CMSServlet { protected String escapeJavaScriptString(String v) { int l = v.length(); char in[] = new char[l]; - char out[] = new char[l * 2]; + char out[] = new char[l * 4]; int j = 0; v.getChars(0, l, in, 0); @@ -339,9 +339,10 @@ public class ProfileServlet extends CMSServlet { /* some inputs are coming in as '\' and 'n' */ /* see BZ 500736 for details */ - if ((c == 0x5c) && ((i+1)<l) && (in[i+1] == 'n')) { + if ((c == 0x5c) && ((i+1)<l) && (in[i+1] == 'n' || + in[i+1] == 'n' || in[i+1] == 'f' || in[i+1] == 't')) { out[j++] = '\\'; - out[j++] = 'n'; + out[j++] = in[i+1]; i++; continue; } @@ -372,6 +373,25 @@ public class ProfileServlet extends CMSServlet { out[j++] = 'f'; break; + case '\t': + out[j++] = '\\'; + out[j++] = 't'; + break; + + case '<': + out[j++] = '\\'; + out[j++] = 'x'; + out[j++] = '3'; + out[j++] = 'c'; + break; + + case '>': + out[j++] = '\\'; + out[j++] = 'x'; + out[j++] = '3'; + out[j++] = 'e'; + break; + default: out[j++] = c; } |