diff --git a/frontend/gulpfile-img64.js b/frontend/gulpfile-img64.js
index aaed2756..a21b7130 100644
--- a/frontend/gulpfile-img64.js
+++ b/frontend/gulpfile-img64.js
@@ -32,7 +32,9 @@ module.exports = function() {
}
if (file.isBuffer()) {
- var $ = cheerio.load(String(file.contents));
+ var $ = cheerio.load(String(file.contents), {
+ xmlMode: mime.lookup(file.path) == "application/xml"
+ });
$('img').each(function() {
$(this).attr('src', replacePath($(this).attr('src'), file));
@@ -42,6 +44,10 @@ module.exports = function() {
$(this).attr('href', replacePath($(this).attr('href'), file));
});
+ $('OpenSearchDescription Image').each(function() {
+ $(this).text(replacePath($(this).text(), file));
+ });
+
file.contents = new Buffer($.html());
return callback(null, file);
diff --git a/frontend/gulpfile.js b/frontend/gulpfile.js
index ad184731..c050e535 100644
--- a/frontend/gulpfile.js
+++ b/frontend/gulpfile.js
@@ -107,7 +107,10 @@ gulp.task("all", [ "deps", "app" ], function() {
concat("all.css"),
sourcemaps.write("./sourcemaps")
),
- gulp.src("deref.html")
+ combine(
+ gulp.src([ "deref.html", "opensearch.xml" ]),
+ img64()
+ )
),
gulp.dest("build")
);
diff --git a/frontend/index.html b/frontend/index.html
index 7aaaf837..bad6e934 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -6,6 +6,7 @@
+