(text: string)
| 55 | } |
| 56 | |
| 57 | function decodeHtmlEntities(text: string): string { |
| 58 | let decoded = text |
| 59 | let previous: string |
| 60 | |
| 61 | do { |
| 62 | previous = decoded |
| 63 | decoded = decoded |
| 64 | .replace(/ /g, ' ') |
| 65 | .replace(/</g, '<') |
| 66 | .replace(/>/g, '>') |
| 67 | .replace(/"/g, '"') |
| 68 | .replace(/'/g, "'") |
| 69 | decoded = decoded.replace(/&/g, '&') |
| 70 | } while (decoded !== previous) |
| 71 | |
| 72 | return decoded |
| 73 | } |
| 74 | |
| 75 | function stripHtmlTags(html: string): string { |
| 76 | let text = html |
no test coverage detected