mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-17 01:38:46 +00:00
Fix whitespace and comment discrepancies
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// NB: This function can still return unsafe HTML
|
||||
export const unescapeHTML = (html) => {
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.innerHTML = html.replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n').replace(/<[^>]*>/g, '');
|
||||
|
||||
Reference in New Issue
Block a user