Skip to content

Commit

Permalink
Updated HTML Chars tables
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasgoutaland committed Jul 7, 2015
1 parent 36f229b commit 322ad94
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Classes/GONMarkupParser.h
Expand Up @@ -13,7 +13,13 @@
//
// History
// -------
// 0.5 Initial release
// 0.6.5 : Updated HTML chars tables
// 0.6.4 : Updated HTML chars tables
// 0.6.3 : Fixed a bug in anchor support
// 0.6.2 : Added anchor support
// 0.6.1 : Added support for underline and strikethrough color
// 0.6 : Added support for underline / strikethrough text
// 0.5 : Initial release

// Roadmap
// -------
Expand Down
250 changes: 250 additions & 0 deletions Classes/GONMarkupParserUtils.m
Expand Up @@ -342,9 +342,134 @@ + (void)initialize
};

dicDecHTMLEntities = @{
@" " : @" ",
@"!" : @"!",
@""" : @"\"",
@"#" : @"#",
@"$" : @"$",
@"%" : @"%",
@"&" : @"&",
@"'" : @"'",
@"(" : @"(",
@")" : @")",
@"*" : @"*",
@"+" : @"+",
@"," : @",",
@"-" : @"-",
@"." : @".",
@"/" : @"/",
@"0" : @"0",
@"1" : @"1",
@"2" : @"2",
@"3" : @"3",
@"4" : @"4",
@"5" : @"5",
@"6" : @"6",
@"7" : @"7",
@"8" : @"8",
@"9" : @"9",
@":" : @":",
@"&#59;" : @";",
@"&#60;" : @"<",
@"&#61;" : @"=",
@"&#62;" : @">",
@"&#63;" : @"?",
@"&#64;" : @"@",
@"&#65;" : @"A",
@"&#66;" : @"B",
@"&#67;" : @"C",
@"&#68;" : @"D",
@"&#69;" : @"E",
@"&#70;" : @"F",
@"&#71;" : @"G",
@"&#72;" : @"H",
@"&#73;" : @"I",
@"&#74;" : @"J",
@"&#75;" : @"K",
@"&#76;" : @"L",
@"&#77;" : @"M",
@"&#78;" : @"N",
@"&#79;" : @"O",
@"&#80;" : @"P",
@"&#81;" : @"Q",
@"&#82;" : @"R",
@"&#83;" : @"S",
@"&#84;" : @"T",
@"&#85;" : @"U",
@"&#86;" : @"V",
@"&#87;" : @"W",
@"&#88;" : @"X",
@"&#89;" : @"Y",
@"&#90;" : @"Z",
@"&#91;" : @"[",
@"&#92;" : @"\\",
@"&#93;" : @"]",
@"&#94;" : @"^",
@"&#95;" : @"_",
@"&#96;" : @"`",
@"&#97;" : @"a",
@"&#98;" : @"b",
@"&#99;" : @"c",
@"&#100;" : @"d",
@"&#101;" : @"e",
@"&#102;" : @"f",
@"&#103;" : @"g",
@"&#104;" : @"h",
@"&#105;" : @"i",
@"&#106;" : @"j",
@"&#107;" : @"k",
@"&#108;" : @"l",
@"&#109;" : @"m",
@"&#110;" : @"n",
@"&#111;" : @"o",
@"&#112;" : @"p",
@"&#113;" : @"q",
@"&#114;" : @"r",
@"&#115;" : @"s",
@"&#116;" : @"t",
@"&#117;" : @"u",
@"&#118;" : @"v",
@"&#119;" : @"w",
@"&#120;" : @"x",
@"&#121;" : @"y",
@"&#122;" : @"z",
@"&#123;" : @"{",
@"&#124;" : @"|",
@"&#125;" : @"}",
@"&#126;" : @"~",
@"&#127;" : @"\u0127",
@"&#128;" : @"\u0128",
@"&#129;" : @"\u0129",
@"&#130;" : @"\u0130",
@"&#131;" : @"\u0131",
@"&#132;" : @"\u0132",
@"&#133;" : @"\u0133",
@"&#134;" : @"\u0134",
@"&#135;" : @"\u0135",
@"&#136;" : @"\u0136",
@"&#137;" : @"\u0137",
@"&#138;" : @"\u0138",
@"&#139;" : @"\u0139",
@"&#140;" : @"\u0140",
@"&#141;" : @"\u0141",
@"&#142;" : @"\u0142",
@"&#143;" : @"\u0143",
@"&#144;" : @"\u0144",
@"&#145;" : @"\u0145",
@"&#146;" : @"\u0146",
@"&#147;" : @"\u0147",
@"&#148;" : @"\u0148",
@"&#149;" : @"\u0149",
@"&#150;" : @"\u0150",
@"&#151;" : @"\u0151",
@"&#152;" : @"\u0152",
@"&#153;" : @"\u0153",
@"&#154;" : @"\u0154",
@"&#155;" : @"\u0155",
@"&#156;" : @"\u0156",
@"&#157;" : @"\u0157",
@"&#158;" : @"\u0158",
@"&#159;" : @"\u0159",
@"&#160;" : @"\u00A0",
@"&#161;" : @"\u00A1",
@"&#162;" : @"\u00A2",
Expand Down Expand Up @@ -568,9 +693,134 @@ + (void)initialize
};

dicHexaHTMLEntities = @{
@"&#x20;" : @" ",
@"&#x21;" : @"!",
@"&#x22;" : @"\"",
@"&#x23;" : @"#",
@"&#x24;" : @"$",
@"&#x25;" : @"%",
@"&#x26;" : @"&",
@"&#x27;" : @"'",
@"&#x28;" : @"(",
@"&#x29;" : @")",
@"&#x2A;" : @"*",
@"&#x2B;" : @"+",
@"&#x2C;" : @",",
@"&#x2D;" : @"-",
@"&#x2E;" : @".",
@"&#x2F;" : @"/",
@"&#x30;" : @"0",
@"&#x31;" : @"1",
@"&#x32;" : @"2",
@"&#x33;" : @"3",
@"&#x34;" : @"4",
@"&#x35;" : @"5",
@"&#x36;" : @"6",
@"&#x37;" : @"7",
@"&#x38;" : @"8",
@"&#x39;" : @"9",
@"&#x3A;" : @":",
@"&#x3B;" : @";",
@"&#x3C;" : @"<",
@"&#x3D;" : @"=",
@"&#x3E;" : @">",
@"&#x3F;" : @"?",
@"&#x40;" : @"@",
@"&#x41;" : @"A",
@"&#x42;" : @"B",
@"&#x43;" : @"C",
@"&#x44;" : @"D",
@"&#x45;" : @"E",
@"&#x46;" : @"F",
@"&#x47;" : @"G",
@"&#x48;" : @"H",
@"&#x49;" : @"I",
@"&#x4A;" : @"J",
@"&#x4B;" : @"K",
@"&#x4C;" : @"L",
@"&#x4D;" : @"M",
@"&#x4E;" : @"N",
@"&#x4F;" : @"O",
@"&#x50;" : @"P",
@"&#x51;" : @"Q",
@"&#x52;" : @"R",
@"&#x53;" : @"S",
@"&#x54;" : @"T",
@"&#x55;" : @"U",
@"&#x56;" : @"V",
@"&#x57;" : @"W",
@"&#x58;" : @"X",
@"&#x59;" : @"Y",
@"&#x5A;" : @"Z",
@"&#x5B;" : @"[",
@"&#x5C;" : @"\\",
@"&#x5D;" : @"]",
@"&#x5E;" : @"^",
@"&#x5F;" : @"_",
@"&#x60;" : @"`",
@"&#x61;" : @"a",
@"&#x62;" : @"b",
@"&#x63;" : @"c",
@"&#x64;" : @"d",
@"&#x65;" : @"e",
@"&#x66;" : @"f",
@"&#x67;" : @"g",
@"&#x68;" : @"h",
@"&#x69;" : @"i",
@"&#x6A;" : @"j",
@"&#x6B;" : @"k",
@"&#x6C;" : @"l",
@"&#x6D;" : @"m",
@"&#x6E;" : @"n",
@"&#x6F;" : @"o",
@"&#x70;" : @"p",
@"&#x71;" : @"q",
@"&#x72;" : @"r",
@"&#x73;" : @"s",
@"&#x74;" : @"t",
@"&#x75;" : @"u",
@"&#x76;" : @"v",
@"&#x77;" : @"w",
@"&#x78;" : @"x",
@"&#x79;" : @"y",
@"&#x7A;" : @"z",
@"&#x7B;" : @"{",
@"&#x7C;" : @"|",
@"&#x7D;" : @"}",
@"&#x7E;" : @"~",
@"&#x7F;" : @"\u0127",
@"&#x80;" : @"\u0128",
@"&#x81;" : @"\u0129",
@"&#x82;" : @"\u0130",
@"&#x83;" : @"\u0131",
@"&#x84;" : @"\u0132",
@"&#x85;" : @"\u0133",
@"&#x86;" : @"\u0134",
@"&#x87;" : @"\u0135",
@"&#x88;" : @"\u0136",
@"&#x89;" : @"\u0137",
@"&#x8A;" : @"\u0138",
@"&#x8B;" : @"\u0139",
@"&#x8C;" : @"\u0140",
@"&#x8D;" : @"\u0141",
@"&#x8E;" : @"\u0142",
@"&#x8F;" : @"\u0143",
@"&#x90;" : @"\u0144",
@"&#x91;" : @"\u0145",
@"&#x92;" : @"\u0146",
@"&#x93;" : @"\u0147",
@"&#x94;" : @"\u0148",
@"&#x95;" : @"\u0149",
@"&#x96;" : @"\u0150",
@"&#x97;" : @"\u0151",
@"&#x98;" : @"\u0152",
@"&#x99;" : @"\u0153",
@"&#x9A;" : @"\u0154",
@"&#x9B;" : @"\u0155",
@"&#x9C;" : @"\u0156",
@"&#x9D;" : @"\u0157",
@"&#x9E;" : @"\u0158",
@"&#x9F;" : @"\u0159",
@"&#xA0;" : @"\u00A0",
@"&#xA1;" : @"\u00A1",
@"&#xA2;" : @"\u00A2",
Expand Down
2 changes: 1 addition & 1 deletion GONMarkupParser.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "GONMarkupParser"
s.version = "0.6.4"
s.version = "0.6.5"
s.summary = "NSAttributedString generation from NSString using XML, that can be easily extended."
s.platform = :ios, "7.0"
s.description = <<-DESC
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -299,6 +299,8 @@ No, definitely not. I was still able to push to GitHub yesterday.
- Improve closing tag

##Versions
__0.6.5__ : Updated HTML chars tables<br/>
__0.6.4__ : Updated HTML chars tables<br/>
__0.6.3__ : Fixed a bug in anchor support<br/>
__0.6.2__ : Added anchor support<br/>
__0.6.1__ : Added support for underline and strikethrough color<br/>
Expand Down

0 comments on commit 322ad94

Please sign in to comment.