-
Notifications
You must be signed in to change notification settings - Fork 605
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
Unicode character inside attributes. #165
Comments
Has there been any progress on this? I am outputting some embedded HTML in an XML doc and would like to override the rendering behavior to output Looks like it's the xmlbuilder-js lib that does the escaping but just wondering if you have any pre/post-processing hooks I could leverage? |
In your opinion, @jameshowe, what would the hook provide for functionality? How would you interact with said hooks? |
@tflanagan in my head I just see it as a way to get in between the processing to manipulate the output e.g.
Alternatively, rather than having it set globally, we could set it at element level? e.g.
The builder would just have to check for the existence of the handler. |
Looking at the xmlbuilder-js module, it looks like this might take some work before getting it 100%. |
@tflanagan if I'm reading the xmlbuilder-js code correctly (which I may not be as I don't use CoffeeScript!), it seems like they provide the ability to override the The blocker from xml2js is the fact we only pass specific options down. If, for arguments sake, we changed this code to:
We could pass stringify-specific options which should allow us to override the behaviour e.g.
The downside here though is we can't be specific about which elements we want to manipulate as we don't have access to the element. |
Exactly, before this can be implemented in the fashion you are requesting, a PR will need to be made for xmlbuilder-js. Otherwise, anything done in here is a workaround hack. |
+1 |
Is there any progress on this? I am hitting the same issue. |
I am not working on pushing such a PR to xmlbuilder-js, but I encourrage you to do so. |
Hi,
Every time I have a new line, a tab or some other special characters inside an attribute value, the xml builder creates a xml string with html entities like and . How can I disable it and get new lines and tabs in my attribute value?
My original xml block:
The result after parsing and building:
The text was updated successfully, but these errors were encountered: