Created
July 12, 2009 06:49
-
-
Save j4johnfox/145554 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <Foundation/CPString.j> | |
@implementation CPString (MMSCategories) | |
- (CPString)stringByEsapingHTMLEncoding | |
// Bruteforce way, stolen from Prototype for unescaping | |
// HTML encoded strings (e.g. convert "e; to ") | |
{ | |
var temp = document.createElement("div"); | |
temp.innerHTML = self; | |
var result = temp.childNodes[0].nodeValue; | |
temp.removeChild(temp.firstChild); | |
return result; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment