made regex smaller, just in case..

This commit is contained in:
daniel-j 2016-08-22 12:00:42 +02:00
parent 50b43156da
commit 1510d23797

View file

@ -33,7 +33,7 @@ export function cleanMarkup (html) {
// Fix links pointing to pages on fimfiction
// Example: <a href="/user/djazz" rel="nofollow">djazz</a>
let matchLink = /(<a .?href=")(.+?)(".+?>.+?<\/a>)/g
let matchLink = /(<a .?href=")(.+?)(".+?>)/g
html = html.replace(matchLink, (match, head, url, tail) => {
if (url.substring(0, 1) !== '#' && url.substring(0, 2) !== '//' && url.substring(0, 4) !== 'http') {
if (url.substring(0, 1) === '/') {