Summary
Hi.
When we have a CVE that has a link with extra text in parenthesis in either the Bugs or References sections, it gets an incorrect link redirection because it adds the extra text to the links.
We are wondering if that is something that might be fixed, please.
In summary, when we have a http://link.to.something (notes) we would like to have the link shown in the page as http://link.to.something (notes) but the redirection to http://link.to.something
Example: https://ubuntu.com/security/CVE-2014-4607
Process
Access a CVE with links in Bugs and/or References with extra text in parenthesis and try to access that link.
Current and expected result
From the example above (https://ubuntu.com/security/CVE-2014-4607)
Current web source
<li><a href="https://bugs.launchpad.net/ubuntu/+source/krfb/+bug/1352421 (krfb)">https://bugs.launchpad.net/ubuntu/+source/krfb/+bug/1352421 (krfb)</a></li>
Expected web source
<li><a href="https://bugs.launchpad.net/ubuntu/+source/krfb/+bug/1352421">https://bugs.launchpad.net/ubuntu/+source/krfb/+bug/1352421 (krfb)</a></li>
Extra comments
There was a python pseudocode suggestion that was used to discuss this issue with @mtruj013 in mattermost some days ago that I would like to add here in case it helps:
{% for reference in cve.references %}
reference_link = reference
{% if ' (' in reference %}
reference_link = reference[0:reference.index(' (')].strip()
{% endif %}
<li><a href="{{ reference_link }}">{{ reference }}</a></li>
{% endfor %}
....
{% for bug in cve.bugs %}
bug_link = bug
{% if ' (' in bug %}
bug_link = bug[0:bug.index(' (')].strip()
{% endif %}
<li><a href="{{ bug_link }}">{{ bug }}</a></li>
{% endfor %}
Summary
Hi.
When we have a CVE that has a link with extra text in parenthesis in either the Bugs or References sections, it gets an incorrect link redirection because it adds the extra text to the links.
We are wondering if that is something that might be fixed, please.
In summary, when we have a
http://link.to.something (notes)we would like to have the link shown in the page ashttp://link.to.something (notes)but the redirection tohttp://link.to.somethingExample: https://ubuntu.com/security/CVE-2014-4607
Process
Access a CVE with links in Bugs and/or References with extra text in parenthesis and try to access that link.
Current and expected result
From the example above (https://ubuntu.com/security/CVE-2014-4607)
Current web source
Expected web source
Extra comments
There was a python pseudocode suggestion that was used to discuss this issue with @mtruj013 in mattermost some days ago that I would like to add here in case it helps:
{% for reference in cve.references %} reference_link = reference {% if ' (' in reference %} reference_link = reference[0:reference.index(' (')].strip() {% endif %} <li><a href="{{ reference_link }}">{{ reference }}</a></li> {% endfor %} .... {% for bug in cve.bugs %} bug_link = bug {% if ' (' in bug %} bug_link = bug[0:bug.index(' (')].strip() {% endif %} <li><a href="{{ bug_link }}">{{ bug }}</a></li> {% endfor %}