Enabling shorter import paths [automatic]
This commit is contained in:
26
bin/build-keycloak-theme/generateFtl/String.htmlUnescape.js
Normal file
26
bin/build-keycloak-theme/generateFtl/String.htmlUnescape.js
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
var es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
|
||||
|
||||
var unes = {
|
||||
'&': '&',
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'>': '>',
|
||||
''': "'",
|
||||
''': "'",
|
||||
'"': '"',
|
||||
'"': '"'
|
||||
};
|
||||
var cape = function (m) { return unes[m]; };
|
||||
|
||||
Object.defineProperty(
|
||||
String,
|
||||
"htmlUnescape",
|
||||
{
|
||||
"value": function (un) {
|
||||
return String.prototype.replace.call(un, es, cape);
|
||||
}
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user