Mercurial > libervia-web
changeset 878:2aaac0605ae2
browser (strings): fixXHTMLLinks skips internal anchors (links starting with "#")
fix bug 126
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 05 Mar 2016 13:55:24 +0100 (2016-03-05) |
parents | acde4b729034 |
children | 2e0e9cf9efb4 |
files | src/browser/sat_browser/strings.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser/sat_browser/strings.py Fri Mar 04 22:32:18 2016 +0100 +++ b/src/browser/sat_browser/strings.py Sat Mar 05 13:55:24 2016 +0100 @@ -83,7 +83,7 @@ while ((result = tag_re.exec(xhtml)) !== null) { tag = result[0]; var link_result = /href="([^"]*)"/.exec(tag); - if (link_result) { // found a link + if (link_result && !(link_result[1].startsWith("#"))) { // found a link which is not an internal anchor var link = link_result[0]; var url = link_result[1]; if (! /target="([^"]*)"/.test(tag)) { // no target