fix regex filter (#1845)
* fix regex filter * fixed br to linebreak and, stlip tags. * change to send raw content * changed to unescape in reducer
This commit is contained in:
parent
fc34e0e191
commit
90760eae4c
2 changed files with 7 additions and 2 deletions
|
@ -48,6 +48,9 @@ const normalizeStatus = (state, status) => {
|
|||
normalStatus.reblog = status.reblog.id;
|
||||
}
|
||||
|
||||
const linebreakComplemented = status.content.replace(/<br \/>/g, '\n').replace(/<\/p><p>/g, '\n\n');
|
||||
normalStatus.unescaped_content = new DOMParser().parseFromString(linebreakComplemented, 'text/html').documentElement.textContent;
|
||||
|
||||
return state.update(status.id, Immutable.Map(), map => map.mergeDeep(Immutable.fromJS(normalStatus)));
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue