mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
1) SMACK-170 - Added JID escaping capabilities to SMACK.
2) Escaping form field values to prevent bad xml. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@5363 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
1df8baa6f7
commit
85781a7158
8 changed files with 83 additions and 35 deletions
|
@ -20,6 +20,8 @@
|
|||
|
||||
package org.jivesoftware.smackx;
|
||||
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
|
@ -288,7 +290,7 @@ public class FormField {
|
|||
}
|
||||
// Loop through all the values and append them to the string buffer
|
||||
for (Iterator<String> i = getValues(); i.hasNext();) {
|
||||
buf.append("<value>").append(i.next()).append("</value>");
|
||||
buf.append("<value>").append(StringUtils.escapeForXML(i.next())).append("</value>");
|
||||
}
|
||||
// Loop through all the values and append them to the string buffer
|
||||
for (Iterator i = getOptions(); i.hasNext();) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue