Fix whitespace and comment discrepancies
This commit is contained in:
1 parent
08ac91c40b
commit
b1f0457cb8
5 files changed
+9
-6
No files matched your search
@@ -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