Scope & rewrite in links to what is actually contained in the href
This commit is contained in:
parent
c1bbb23daf
commit
14e536947b
1 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,11 @@
|
|||
function fixPostHtml(data) {
|
||||
data = data.replace(/<\\?\/?span[^>]*>/g, "");
|
||||
data = data.replace(/<br>/g, "<br/>");
|
||||
data = data.replace(/&/g, "&");
|
||||
var hrefreg = /<a\shref=\\?"([^>]*)\\?">/;
|
||||
var hrefm = hrefreg.exec(data);
|
||||
if (hrefm != null) {
|
||||
var href = hrefm[1].replace(/&/g, "&");
|
||||
data = data.replace(hrefreg, "<a href=\"" + href + "\">");
|
||||
}
|
||||
return data;
|
||||
}
|
Reference in a new issue