Last modified: 2014-11-16 16:12:22 UTC
* Raw commit message: https://gerrit.wikimedia.org/r/#/c/135756/13//COMMIT_MSG ** http://fab.wmflabs.org/T352 * Parsed commit message: https://gerrit.wikimedia.org/r/#/c/135756 ** <a href="http://fab.wmflabs.org/<a href=" https:="" phabricator.wikimedia.org="" t352"="">T352</a>" target="_blank">http://fab.wmflabs.org/<a href="https://phabricator.wikimedia.org/T352">T352</a>
It's a link to the test instance, so probably no one needs this in future. Still, the malformed HTML should not show up.
We added a linking for /T\d+/ or something similar. Since it's using a regex and not a parser it doesn't notice that the task reference is in a quoted string.
There's probably a dupe of this bug.(In reply to Bryan Davis from comment #2) > We added a linking for /T\d+/ or something similar. Since it's using a regex > and not a parser it doesn't notice that the task reference is in a quoted > string. Far too simple of a regex :)
This request sounds so harmless, but we're hitting some edge-cases here: * Gerrit's Issue Tracker framework relies on the first group being the id of the issue tracker. So we cannot do something in the spirit of ([^a-zA-Z0-9/])T(\d+) as then, Gerrit would take the ([^a-zA-Z0-9/]) as task number. * Gerrit's commentlinks cannot do non-capturing groups. So we cannot do something in the spirit of (?:[^a-zA-Z0-9/])T(\d+) . * Gerrit's commentlinks cannot do lookbehinds So we cannot do something in the spirit of (?<![a-zA-Z0-9/])T(\d+) . Since the Gerrit's commentlinks code is doing weird things to make sure it is safe html, I guess it's easiest thing would be to patch Gerrit's Issue Tracker framework to allow to specify which group number is the issue tracker id.