Skip to content

Search + click on highlighted tag searches by HTML instead of by tag content #917

@RamRS

Description

@RamRS

This happens both at https://www.biostars.org/ and https://support.bioconductor.org/

Steps to reproduce:

  1. Search for a term that can appear in/as tags: https://www.biostars.org/post/search/?query=TCGA
  2. Click on a tag that has a yellow highlight: screenshot
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions