(str)
| 3188 | |
| 3189 | var escapeElement = document.createElement("pre"); |
| 3190 | function htmlEscape(str) { |
| 3191 | escapeElement.textContent = str; |
| 3192 | return escapeElement.innerHTML; |
| 3193 | } |
| 3194 | // Recent (late 2011) Opera betas insert bogus newlines at the start |
| 3195 | // of the textContent, so we strip those. |
| 3196 | if (htmlEscape("a") == "\na") |
no outgoing calls
no test coverage detected