Created
October 21, 2009 11:19
-
-
Save cers/215044 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 344ae5a3aa11 ubiquity/modules/cmdutils.js | |
--- a/ubiquity/modules/cmdutils.js Wed Oct 21 18:17:42 2009 +0900 | |
+++ b/ubiquity/modules/cmdutils.js Wed Oct 21 13:18:32 2009 +0200 | |
@@ -1167,17 +1167,18 @@ | |
template = "<dl class='list'>"; | |
let max = Math.min(results.length, parser.maxResults || 4); | |
let {baseurl} = parser; | |
- let {escapeHtml, url} = Utils; | |
+ baseurl || (baseurl = url); | |
+ let {escapeHtml, uri} = Utils; | |
for (let i = 0; i < max; ++i) { | |
let result = results[i], key = i < 35 ? (i+1).toString(36) : "-"; | |
template += ( | |
"<dt class='title'><kbd>" + key + "</kbd> <a href='" + | |
- escapeHtml(url({uri: result.href, base: baseurl}).spec) + | |
+ escapeHtml(uri({uri: result.href, base: baseurl}).spec) + | |
"' accesskey='" + key + "'>" + result.title + "</a></dt>"); | |
if ("thumbnail" in result) | |
template += ( | |
"<dd class='thumbnail'><img src='" + | |
- escapeHtml(url({uri: result.thumbnail, base: baseurl}).spec) + | |
+ escapeHtml(uri({uri: result.thumbnail, base: baseurl}).spec) + | |
"'/></dd>"); | |
if ("preview" in result) | |
template += "<dd class='preview'>" + result.preview + "</dd>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment