diff options
Diffstat (limited to 'node_modules/locutus/php/strings/htmlentities.js.map')
-rw-r--r-- | node_modules/locutus/php/strings/htmlentities.js.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/node_modules/locutus/php/strings/htmlentities.js.map b/node_modules/locutus/php/strings/htmlentities.js.map new file mode 100644 index 0000000..1dc29b8 --- /dev/null +++ b/node_modules/locutus/php/strings/htmlentities.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../src/php/strings/htmlentities.js"],"names":["module","exports","htmlentities","string","quoteStyle","charset","doubleEncode","getHtmlTranslationTable","require","hashMap","regex","RegExp","Object","keys","join","replace","ent","length","substr"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,YAAT,CAAuBC,MAAvB,EAA+BC,UAA/B,EAA2CC,OAA3C,EAAoDC,YAApD,EAAkE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAIC,0BAA0BC,QAAQ,uCAAR,CAA9B;AACA,MAAIC,UAAUF,wBAAwB,eAAxB,EAAyCH,UAAzC,CAAd;;AAEAD,WAASA,WAAW,IAAX,GAAkB,EAAlB,GAAuBA,SAAS,EAAzC;;AAEA,MAAI,CAACM,OAAL,EAAc;AACZ,WAAO,KAAP;AACD;;AAED,MAAIL,cAAcA,eAAe,YAAjC,EAA+C;AAC7CK,YAAQ,GAAR,IAAe,QAAf;AACD;;AAEDH,iBAAeA,iBAAiB,IAAjB,IAAyB,CAAC,CAACA,YAA1C;;AAEA,MAAII,QAAQ,IAAIC,MAAJ,CAAW,gDACrBC,OAAOC,IAAP,CAAYJ,OAAZ,EACCK,IADD,CACM,EADN;AAEA;AAFA,GAGCC,OAHD,CAGS,0BAHT,EAGqC,MAHrC,CADqB,GAI0B,GAJrC,EAKV,GALU,CAAZ;;AAOA,SAAOZ,OAAOY,OAAP,CAAeL,KAAf,EAAsB,UAAUM,GAAV,EAAe;AAC1C,QAAIA,IAAIC,MAAJ,GAAa,CAAjB,EAAoB;AAClB,aAAOX,eAAeG,QAAQ,GAAR,IAAeO,IAAIE,MAAJ,CAAW,CAAX,CAA9B,GAA8CF,GAArD;AACD;;AAED,WAAOP,QAAQO,GAAR,CAAP;AACD,GANM,CAAP;AAOD,CA/CD","file":"htmlentities.js","sourcesContent":["module.exports = function htmlentities (string, quoteStyle, charset, doubleEncode) {\n // discuss at: http://locutus.io/php/htmlentities/\n // original by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // revised by: Kevin van Zonneveld (http://kvz.io)\n // improved by: nobbler\n // improved by: Jack\n // improved by: RafaĆ Kukawski (http://blog.kukawski.pl)\n // improved by: Dj (http://locutus.io/php/htmlentities:425#comment_134018)\n // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n // bugfixed by: Brett Zamir (http://brett-zamir.me)\n // input by: Ratheous\n // note 1: function is compatible with PHP 5.2 and older\n // example 1: htmlentities('Kevin & van Zonneveld')\n // returns 1: 'Kevin & van Zonneveld'\n // example 2: htmlentities(\"foo'bar\",\"ENT_QUOTES\")\n // returns 2: 'foo'bar'\n\n var getHtmlTranslationTable = require('../strings/get_html_translation_table')\n var hashMap = getHtmlTranslationTable('HTML_ENTITIES', quoteStyle)\n\n string = string === null ? '' : string + ''\n\n if (!hashMap) {\n return false\n }\n\n if (quoteStyle && quoteStyle === 'ENT_QUOTES') {\n hashMap[\"'\"] = '''\n }\n\n doubleEncode = doubleEncode === null || !!doubleEncode\n\n var regex = new RegExp('&(?:#\\\\d+|#x[\\\\da-f]+|[a-zA-Z][\\\\da-z]*);|[' +\n Object.keys(hashMap)\n .join('')\n // replace regexp special chars\n .replace(/([()[\\]{}\\-.*+?^$|/\\\\])/g, '\\\\$1') + ']',\n 'g')\n\n return string.replace(regex, function (ent) {\n if (ent.length > 1) {\n return doubleEncode ? hashMap['&'] + ent.substr(1) : ent\n }\n\n return hashMap[ent]\n })\n}\n"]}
\ No newline at end of file |