(str)
| 2988 | |
| 2989 | var escapeElement = document.createElement("pre"); |
| 2990 | function htmlEscape(str) { |
| 2991 | escapeElement.textContent = str; |
| 2992 | return escapeElement.innerHTML; |
| 2993 | } |
| 2994 | // Recent (late 2011) Opera betas insert bogus newlines at the start |
| 2995 | // of the textContent, so we strip those. |
| 2996 | if (htmlEscape("a") == "\na") |
no outgoing calls
no test coverage detected