Closed cu closed 6 months ago
This is happening in the mark_query_results()
Jinja filter, which does three things:
markupsafe.Markup.striptags()
html.escape()
.re
search-and-replace to HTMLify query highlighting in the snippet.In order to do this, striptags()
would have to be made aware of Markdown's two preformatted text syntaxes, which is not something I'm super interested in today. The other option is to remove striptags()
from the chain and live with HTML in the search results. (Which might be tolerable since HTML instead of Markdown on my pages is vanishingly rare.)
All told, for now at least I believe I'm going to mark this as won't fix and just try to use parens or curly braces for placeholder values in preformatted text from now on.
This is just a preliminary report for now, more investigation is needed.
onetwotest
.This likely happens because HTML(-like) tags are intentionally getting filtered out of search results to prevent page content from affecting the style of the search results. But it turns out that this is a heavy-handed approach that removes things are are not HTML tags, e.g. placeholders such as
https://<some_domain>.com
.Running the results through an HTML escape function of some kind would be better.