1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-26 08:15:47 +01:00

Decode URIs when shown to the user.

This commit is contained in:
Štěpán Němec
2011-07-27 16:48:41 +02:00
parent 6f63ec1d2e
commit 133bba8b9a

View File

@@ -349,7 +349,7 @@ var Template = Module("Template", {
highlightURL: function highlightURL(str, force) { highlightURL: function highlightURL(str, force) {
if (force || /^[a-zA-Z]+:\/\//.test(str)) if (force || /^[a-zA-Z]+:\/\//.test(str))
return <a highlight="URL" href={str}>{str}</a>; return <a highlight="URL" href={str}>{util.losslessDecodeURI(str)}</a>;
else else
return str; return str;
}, },
@@ -373,7 +373,7 @@ var Template = Module("Template", {
<td class="indicator">{idx == index ? ">" : ""}</td> <td class="indicator">{idx == index ? ">" : ""}</td>
<td>{Math.abs(idx - index)}</td> <td>{Math.abs(idx - index)}</td>
<td style="width: 250px; max-width: 500px; overflow: hidden;">{val.title}</td> <td style="width: 250px; max-width: 500px; overflow: hidden;">{val.title}</td>
<td><a href={val.URI.spec} highlight="URL jump-list">{val.URI.spec}</a></td> <td><a href={val.URI.spec} highlight="URL jump-list">{util.losslessDecodeURI(val.URI.spec)}</a></td>
</tr>) </tr>)
} }
</table>; </table>;