diff --git a/app/soapbox/utils/html.js b/app/soapbox/utils/html.js index fec437c03..f303ba8e8 100644 --- a/app/soapbox/utils/html.js +++ b/app/soapbox/utils/html.js @@ -1,7 +1,7 @@ // NB: This function can still return unsafe HTML export const unescapeHTML = (html) => { const wrapper = document.createElement('div'); - wrapper.innerHTML = html.replace(//g, '\n').replace(/<\/p>

/g, '\n\n').replace(/<[^>]*>/g, ''); + wrapper.innerHTML = html.replace(//g, '\n').replace(/<\/p><[^>]*>/g, '\n\n').replace(/<[^>]*>/g, ''); return wrapper.textContent; };