Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_search.xml malformed #239

Closed
lheckemann opened this issue Feb 13, 2017 · 3 comments
Closed

open_search.xml malformed #239

lheckemann opened this issue Feb 13, 2017 · 3 comments

Comments

@lheckemann
Copy link

The templating seems to substitute the < in the xml version declaration with &lt;. As a result, the search provider cannot be added in firefox.

Example: https://search.nix.gsc.io/open_search.xml

Adding the search provider fails in firefox with the cryptic error message

Firefox could not download the search plugin from:
https://search.nix.gsc.io/open_search.xml

@sahildua2305
Copy link
Contributor

sahildua2305 commented Dec 11, 2017

I'm facing the same issue with open_search.xml as well. I'm looking into fixing this.
@stanistan feel free to assign this to me.

EDIT: the bug is due to use of html/template package to parse the xml file. We should be using text/template or xml to parse it. I'll be pushing the fix soon.

@grahamc
Copy link

grahamc commented Dec 12, 2017

FWIW future bug reviewers, https://search.nix.gsc.io/open_search.xml works fine because I serve a static version of open_search.xml via nginx, instead of passing that request to Hound: https://github.com/grahamc/network/blob/master/zoidberg/default.nix#L155-L162

@stanistan
Copy link
Contributor

@sahildua2305 I can't actually assign you using github's tools (probably due to some settings), but feel free to open a PR with the fix, assign me to review.

stanistan pushed a commit that referenced this issue Dec 21, 2017
open_search.xml file was being served using html/template package and since it doesn't know about xml contexts, it changes the first character of xml template "<" into "&lt;".

Now, we use two different packages:
- html/template - for parsing html template files
- text/template - for parsing text or xml template files

Closes #239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants