From 14e536947b046f2b6c5395686d71e43325c8f90f Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Wed, 5 Feb 2020 22:00:52 -0800 Subject: [PATCH] Scope & rewrite in links to what is actually contained in the href --- assets/parser.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/parser.js b/assets/parser.js index b58b872..7a58d80 100644 --- a/assets/parser.js +++ b/assets/parser.js @@ -20,6 +20,11 @@ function fixPostHtml(data) { data = data.replace(/<\\?\/?span[^>]*>/g, ""); data = data.replace(/
/g, "
"); - data = data.replace(/&/g, "&"); + var hrefreg = /]*)\\?">/; + var hrefm = hrefreg.exec(data); + if (hrefm != null) { + var href = hrefm[1].replace(/&/g, "&"); + data = data.replace(hrefreg, ""); + } return data; } \ No newline at end of file