https://github.com/sonsongithub/htmlspecialcharacters
Library to escape/unescape HTML special characters in Swift.
https://github.com/sonsongithub/htmlspecialcharacters
html swift
Last synced: 30 days ago
JSON representation
Library to escape/unescape HTML special characters in Swift.
- Host: GitHub
- URL: https://github.com/sonsongithub/htmlspecialcharacters
- Owner: sonsongithub
- License: mit
- Created: 2017-02-12T00:37:29.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-20T08:58:05.000Z (over 4 years ago)
- Last Synced: 2025-02-22T23:46:09.707Z (3 months ago)
- Topics: html, swift
- Language: Swift
- Homepage:
- Size: 95.7 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HTMLSpecialCharacters
Library to escape/unescape HTML special characters in Swift.
[Google Toolbox for Mac](https://github.com/google/google-toolbox-for-mac) is known as a great library which supports escaping/unescaping HTML special characters.
But it's written in Objective-C.# Test code
HTMLSpecialCharacters passed the alomost same test code of [Google Toolbox for Mac](https://github.com/google/google-toolbox-for-mac/blob/master/Foundation/GTMNSString%2BHTMLTest.m).
Please check it.# Performance
HTMLSpecialCharacters can escape/unescape HTML special chracters much faster than[ Google Toolbox for Mac](https://github.com/google/google-toolbox-for-mac).
The figure below shows the performance of escaping/unescaping the test code. These score were measured on iMac (27-inch Late 2012).
Test code for Google Toolbox for Mac is [here](https://github.com/sonsongithub/GTMHTMLSpecialCharacters).
# Acknowledgement
[@norio_nomura](https://github.com) gave me a lot of codes and comments. This project is based on [his code](https://gist.github.com/norio-nomura/2a79822004e7c89228300cf19595ca99).
# License
MIT License. This library includes source codes of [Google Toolbox for Mac](https://github.com/google/google-toolbox-for-mac).