Chromium Code Reviews| Index: Source/devtools/front_end/common/utilities.js |
| diff --git a/Source/devtools/front_end/common/utilities.js b/Source/devtools/front_end/common/utilities.js |
| index e8509cec65ad5da9513b0cb7c60984653998d454..8c8d849ced8528b7241b228c2de2c3a6b21a4699 100644 |
| --- a/Source/devtools/front_end/common/utilities.js |
| +++ b/Source/devtools/front_end/common/utilities.js |
| @@ -169,6 +169,20 @@ String.prototype.escapeHTML = function() |
| /** |
| * @return {string} |
| */ |
| +String.prototype.unescapeHTML = function() |
| +{ |
| + return this.replace(/</g, "<") |
| + .replace(/>/g, ">") |
|
lushnikov
2014/09/12 06:39:28
lets indent this with 4 spaces instead of aligning
iliia
2014/09/12 08:46:41
Done.
|
| + .replace(/:/g, ":") |
| + .replace(/"/g, "\"") |
| + .replace(/</g, "<") |
| + .replace(/>/g, ">") |
| + .replace(/&/g, "&"); |
| +} |
| + |
| +/** |
| + * @return {string} |
| + */ |
| String.prototype.collapseWhitespace = function() |
| { |
| return this.replace(/[\s\xA0]+/g, " "); |