An open API service indexing awesome lists of open source software.

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.

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).