gabsocial --> soapbox paths

This commit is contained in:
Alex Gleason
2020-05-28 17:52:07 -05:00
parent 010638cd9b
commit d24dcb3e60
609 changed files with 470 additions and 470 deletions

View File

@ -0,0 +1,6 @@
// 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, '');
return wrapper.textContent;
};