Skip to content

Commit

Permalink
Avoid source link breakage with non-unescapable URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Jan 15, 2013
1 parent f76ce02 commit 730c313
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions extension/content/firebug/chrome/reps.js
Expand Up @@ -1928,16 +1928,17 @@ FirebugReps.SourceLink = domplate(Firebug.Rep,

try
{
var fileName = Url.getFileName(sourceLink.href);
// XXX This is wrong for at least data: URLs. E.g. evaluating
// "%2f" in the command line shows as "/".
var fileName = sourceLink.href;
fileName = Url.getFileName(fileName);
fileName = decodeURIComponent(fileName);
}
catch(exc)
{
if (FBTrace.DBG_ERRORS)
FBTrace.sysout("reps.getSourceLinkTitle decodeURIComponent fails for \'" +
sourceLink.href + "\': " + exc, exc);

fileName = sourceLink.href;
}

var maxWidth = Firebug.sourceLinkLabelWidth;
Expand Down

0 comments on commit 730c313

Please sign in to comment.