Skip to content

Commit 4c01d11

Browse files
committed
Incorrect field when ampersand in URL
When having an ampersand in an URL like: ``` https://en.wikipedia.org/w/index.php?title=Unsharp_masking&oldid=750486803#Photographic_unsharp_masking ``` this can lead to a warning in the xmllint checker like: ``` html\md_aa.html:108: parser error : EntityRef: expecting ';' ck"><p><a href="https://en.wikipedia.org/w/index.php?title=Unsharp_masking&oldid ^ ``` Note in e.g. the xml and docbook format there were already twice the filter call.
1 parent 443b978 commit 4c01d11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/htmldocvisitor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ void HtmlDocVisitor::operator()(const DocURL &u)
401401
else // web address
402402
{
403403
m_t << "<a href=\"";
404-
m_t << u.url() << "\">";
404+
filter(u.url());
405+
m_t << "\">";
405406
filter(u.url());
406407
m_t << "</a>";
407408
}

0 commit comments

Comments
 (0)