[Pkg-mozext-commits] [requestpolicy] 252/280: correct display of rule with scheme & without host
David Prévot
taffit at moszumanska.debian.org
Sat May 2 20:30:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 8696ed1113a14a33b18684fd8911a97494f14231
Author: Martin Kimmerle <dev at 256k.de>
Date: Tue Apr 28 10:22:20 2015 +0200
correct display of rule with scheme & without host
Ensure that the table of rules on the "Your Policy" page shows
the two slashes after „uri:“ only in case a host has been
specified.
Partly fixes the mozmill tests committed in 59e56ee.
---
src/content/settings/yourpolicy.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/content/settings/yourpolicy.js b/src/content/settings/yourpolicy.js
index 6523e6d..a9e1a6a 100644
--- a/src/content/settings/yourpolicy.js
+++ b/src/content/settings/yourpolicy.js
@@ -134,7 +134,13 @@ function addRulesTableRow(table, ruleAction, origin, dest, ruleData, source, rea
function ruleDataPartToDisplayString(ruleDataPart) {
var str = "";
if (ruleDataPart["s"]) {
- str += ruleDataPart["s"] + "://";
+ str += ruleDataPart["s"] + ":";
+
+ if (ruleDataPart["h"]) {
+ // In case no host has been specified, do not show the
+ // two slashes, as it might be an URI without a host.
+ str += "//";
+ }
}
str += ruleDataPart["h"] || "*";
if (ruleDataPart["port"]) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list