Fix links that have already been parsed and oh deal with those brackets #38

This commit is contained in:
Morgan McMillian 2018-02-25 18:57:49 -08:00
parent 57f6d128c5
commit 91ab0585f6

View file

@ -32,8 +32,12 @@ function parsePostText(data) {
} }
function convert(t) { function convert(t) {
t = t.replace(/&/g, "&amp;"); if (t.indexOf('<a href=') > 0) {
t = t.replace(/<3/g, "\u2764"); return t;
t = t.replace(/<=>/g, "&lt;=&gt;"); }
t = t.replace(/&/g, "&amp;");
t = t.replace(/<3/g, "\u2764");
t = t.replace(/</g, "&lt;");
t = t.replace(/>/g, "&gt;");
return t; return t;
} }