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
relativize_paths silently, incorrectly transforms gcse:search
#1319
Comments
I can confirm this is a problem! This appears to be problematic behavior with Nokogiri/libxml for parsing HTML… when reassembling the content, the namespaces are somehow left out. |
This appears to be a common problem without a proper solution (see e.g. jekyll/jemoji#43). Suggestions for workarounds that I’ve found are along the form of
… which is pretty icky. This might not be fixable within Nanoc itself, unfortunately, but perhaps Nanoc can offer an automatic workaround. |
Icky workaround in #1320. |
Thanks for the really quick detective work on this. Given that GCSE is all JS-based, it will never work when blocked by NoScript, etc. This is all a matter of where the grossness exists, not whether or not it exists. If you decide that you dislike #1320 very strongly, I think it would be satisfactory to detect
|
Sucks to hear about the libxml patch that has been lying around for so long! My main problem with #1320 is that it only applies to It might be worth looking into using Oga, for instance. |
relativize_paths silently transforms
gcse:search
Steps to reproduce
This includes an element for the Google JS to manipulate,
<gcse:search></gcse:search>
nanoc
with rules to applyrelativize_paths
on that html file, withtype: html
<search></search>
Expected behavior
I think that
nanoc
should not be transforming that element at all. However, maybe there's some subtlety I'm missing about strict HTML specification.Either of the below would be also acceptable:
nanoc
should print a warning that the element is transformed -- it can surprise people, after allnanoc
should crashfail the build on the elementActual behavior
Instead,
nanoc
succeeds, but changes the element.Details
I'm surprised to be the first person reporting this -- maybe not that many people are using GCSE, or using
relativize_paths
, or maybe I'm doing something else wrong.The text was updated successfully, but these errors were encountered: