/** * Unescape the input string. * * @param string to un-HTML-escape * @param strict if "strict" (that is, requires trailing ';' char, otherwise that's optional) * @return unescaped string */ static String unescape(String string, boolean strict) { return Parser.unescapeEntities(string, strict); }
/** * <p> * Decodes HTML entities in a text from text node and replaces them with * actual characters. * </p> * * <p> * Typically this method will be used by components to read back data (like * option items in {@code AbstractSelect}) from HTML. Note that this method * unencodes more characters than {@link #encodeForTextNode(String)} encodes * </p> * * @since 7.6 * @param input * @return */ public static String decodeFromTextNode(String input) { return Parser.unescapeEntities(input, false); }
org.jsoup.parser.Parser.unescapeEntities(url_data_str, true));
String localRequestName = Parser.unescapeEntities(target, true); localRequestName = UtilHttp.encodeAmpersands(localRequestName);
@Override public String toPlain(String markupText) { // sane default if (markupText == null || markupText.equals("")) return ""; // first clean to have valid html String cleaned = Jsoup.clean(markupText, Whitelist.basic()); // then strip all html out cleaned = Jsoup.clean(cleaned, Whitelist.none()); // unescape all entities cleaned = Parser.unescapeEntities(cleaned, false); // clean further return super.toPlain(cleaned); } }
item.setBarcode(Parser.unescapeEntities(lines[1].trim(), false)); item.setStatus(Parser.unescapeEntities(lines[2].trim(), false)); } else if (lines.length == 2) { item.setAuthor(Parser.unescapeEntities(lines[1].trim(), false));
propertyElem.setAttribute("key", Parser.unescapeEntities(labelInfo.getLabelKey(), true)); if (UtilValidate.isNotEmpty(labelInfo.getLabelKeyComment())) { Comment labelKeyComment = resourceDocument.createComment(Parser.unescapeEntities(labelInfo.getLabelKeyComment(), true)); Node parent = propertyElem.getParentNode(); parent.insertBefore(labelKeyComment, propertyElem); valueString = Parser.unescapeEntities(valueString, true); Element valueElem = UtilXml.addChildElementValue(propertyElem, "value", valueString, resourceDocument); valueElem.setAttribute("xml:lang", localeFound); if (UtilValidate.isNotEmpty(labelValue.getLabelComment())) { Comment labelComment = resourceDocument.createComment(Parser.unescapeEntities(labelValue.getLabelComment(), true)); Node parent = valueElem.getParentNode(); parent.insertBefore(labelComment, valueElem);