code.launchpad.net links do not handle pound (#) in git branch name

Bug #1787965 reported by fermulator
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Colin Watson

Bug Description

Consider the following (legal) bit branch name and status:

~/projects/strongswan$ git status
On branch allow_charon_apparmor_read_proc_fd_LP_#1786250

$ git remote -v
origin git://git.launchpad.net/~usd-import-team/ubuntu/+source/strongswan (fetch)
origin git://git.launchpad.net/~usd-import-team/ubuntu/+source/strongswan (push)
staging git+ssh://<email address hidden>/~fermulator/ubuntu/+source/strongswan (fetch)
staging git+ssh://<email address hidden>/~fermulator/ubuntu/+source/strongswan (push)

Directly viewing the git views, links work fine:

https://git.launchpad.net/~fermulator/ubuntu/+source/strongswan/
, https://git.launchpad.net/~fermulator/ubuntu/+source/strongswan/log/?h=allow_charon_apparmor_read_proc_fd_LP_%231786250
, https://git.launchpad.net/~fermulator/ubuntu/+source/strongswan/commit/?h=allow_charon_apparmor_read_proc_fd_LP_%231786250&id=d0ec74d30d6742d34b3dc72113bbc933c608fffa

However, when viewing from the "code", the "#" does not get converted to %23.
https://www.tutorialspoint.com/html/html_url_encoding.htm

For example:
 - https://code.launchpad.net/~fermulator/ubuntu/+source/strongswan/+git/strongswan

, see this:
{{{
Branches
Name Last Modified Last Commit
allow_charon_apparmor_read_proc_fd_LP_#1786250 58 minutes ago
As per LP #1786250, user noted audit failures in system log

LINKS TO: --> https://code.launchpad.net/~fermulator/ubuntu/+source/strongswan/+git/strongswan/+ref/allow_charon_apparmor_read_proc_fd_LP_#1786250
}}}

whoops,
{{{
Lost something?

This page does not exist, or you may not have permission to see it.
}}}
 it needs to link to:
 -> https://code.launchpad.net/~fermulator/ubuntu/+source/strongswan/+git/strongswan/+ref/allow_charon_apparmor_read_proc_fd_LP_%231786250/

Related branches

Revision history for this message
Colin Watson (cjwatson) wrote :

Nicely spotted. Most of the things we put into Launchpad URLs have very restricted syntax such that they don't require quoting, but ref names are indeed an exception here.

tags: added: 404 git lp-code
Changed in launchpad:
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.