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

Bug #1787965 reported by fermulator on 2018-08-20
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
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

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
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson) on 2018-08-23
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson) on 2018-08-24
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers