Java編碼和解碼庫:unbescape
unbescape是一個Java類庫,提供了功能強和卓越性能來執行編碼和解碼(escape 和 unescape)操作。支持:
- HTML (HTML5 and HTML 4)
- XML (XML 1.0 and XML 1.1)
- JavaScript
- JSON
- URI / URL (both paths and query parameters)
- CSS (both identifiers and string literals)
- CSV (Comma-Separated Values)
- Java literals
- Java .properties files (both keys and values)
它的目標:
- 為便于使用。只需要幾行代碼。沒有額外的依賴關系。
- To be fast. Faster and lighter than most other options available in Java.
- To be versatile. Provides different escaping types and levels in order to better adapt to different scenarios and contexts.
- To be feature-complete. Includes full HTML5 support, careful implementation of the JavaScript, JSON, Java, etc specifications, advanced format tweaks...
final String unescapedText = HtmlEscape.unescapeHtml(escapedText);
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!