1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 22:47:59 +01:00

Formatting fixes.

This commit is contained in:
Doug Kearns
2009-08-26 23:09:13 +10:00
parent bc1163c0c7
commit b6a898a5fa
9 changed files with 17 additions and 15 deletions

View File

@@ -2085,7 +2085,8 @@ function StatusLine() //{{{
var value = aURI.spec; var value = aURI.spec;
// Try to decode as UTF-8 if there's no encoding sequence that we would break. // Try to decode as UTF-8 if there's no encoding sequence that we would break.
if (!/%25(?:3B|2F|3F|3A|40|26|3D|2B|24|2C|23)/i.test(value)) if (!/%25(?:3B|2F|3F|3A|40|26|3D|2B|24|2C|23)/i.test(value))
try { try
{
value = decodeURI(value) value = decodeURI(value)
// 1. decodeURI decodes %25 to %, which creates unintended // 1. decodeURI decodes %25 to %, which creates unintended
// encoding sequences. Re-encode it, unless it's part of // encoding sequences. Re-encode it, unless it's part of
@@ -2096,7 +2097,8 @@ function StatusLine() //{{{
// by the location bar (bug 410726). // by the location bar (bug 410726).
.replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)|[\r\n\t]/ig, .replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)|[\r\n\t]/ig,
encodeURIComponent); encodeURIComponent);
} catch (e) {} }
catch (e) {}
// Encode invisible characters (soft hyphen, zero-width space, BOM, // Encode invisible characters (soft hyphen, zero-width space, BOM,
// line and paragraph separator, word joiner, invisible times, // line and paragraph separator, word joiner, invisible times,