Merge branch 'rt-mrf-md' into 'develop'

Fix RT spacing in the other place

See merge request soapbox-pub/soapbox-fe!1014
improve-ci
Alex Gleason 2022-01-28 21:07:09 +00:00
commit dada0f7d73
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n').replace(/<[^>]*>/g, '');
wrapper.innerHTML = html.replace(/<br\s*\/?>/g, '\n').replace(/<\/p><[^>]*>/g, '\n\n').replace(/<[^>]*>/g, '');
return wrapper.textContent;
};