biostar-central
biostar-central copied to clipboard
Search + click on highlighted tag searches by HTML instead of by tag content
This happens both at https://www.biostars.org/ and https://support.bioconductor.org/
Steps to reproduce:
- Search for a term that can appear in/as tags: https://www.biostars.org/post/search/?query=TCGA
- Click on a tag that has a yellow highlight:
- Generates a weird tag query (
https://www.biostars.org/tag/%3Cb%20class=%22match%20term0%22%3ETCGA%3C/b%3E/
).
This happens because while a non-highlighted tag has the HTML content <a class="ptag" href="/tag/barcode/">barcode</a>
, a highlighted tag has the content <a class="ptag" href="/tag/%3Cb%20class=%22match%20term0%22%3ETCGA%3C/b%3E/"><b class="match term0">TCGA</b></a>
or the not so clean <a class="ptag" href="/tag/<b class="match term0">TCGA</b>/"><b class="match term0">TCGA</b></a>
. It looks like the part that sets the innerHTML for the tag also sets the link in one go.