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

correct XML escaping of illegal characters in literals #34

Merged
merged 1 commit into from
Feb 25, 2015

Conversation

barmintor
Copy link
Contributor

Ampersands in XML content need to be escaped, and in attributes where appropriate.

@gkellogg
Copy link
Member

Thanks, but note that there seems to be a problem with the pure- version running REXML.

@barmintor
Copy link
Contributor Author

In transit, will follow up ASAP
On Feb 24, 2015 6:50 PM, "Gregg Kellogg" notifications@github.com wrote:

Thanks, but note that there seems to be a problem with the pure- version
running REXML.


Reply to this email directly or view it on GitHub
#34 (comment).

@barmintor
Copy link
Contributor Author

Do REXML and NG have different deserializations for attributes? That's
awkward.

On Tue, Feb 24, 2015 at 6:58 PM, Benjamin Armintor armintor@gmail.com
wrote:

In transit, will follow up ASAP
On Feb 24, 2015 6:50 PM, "Gregg Kellogg" notifications@github.com wrote:

Thanks, but note that there seems to be a problem with the pure- version
running REXML.


Reply to this email directly or view it on GitHub
#34 (comment).

@gkellogg
Copy link
Member

You probably hit an untested corner case. The reader uses an abstraction layer for the different libraries. I can try to look at it tomorrow, if you like.

@barmintor
Copy link
Contributor Author

It would be great if you had a chance, will check in again tomorrow to see what I can do. We'll work from a branch in the meantime (the attribute case doesn't apply to us)

@gkellogg gkellogg merged commit d5d1e1d into ruby-rdf:develop Feb 25, 2015
@gkellogg
Copy link
Member

It seems that REXML XPath varies slightly for returning the attribute content. Nokogiri unescapes the result, REXML doesn't.

I separated the tests into with- and without-attribute use; fixed a bug where the triple was being output both as an attribute and an element, and restored the original simple example it was based on.

Thanks for finding and working on this!

@barmintor
Copy link
Contributor Author

Thanks for the library!

On Wed, Feb 25, 2015 at 2:13 AM, Gregg Kellogg notifications@github.com
wrote:

It seems that REXML XPath varies slightly for returning the attribute
content. Nokogiri unescapes the result, REXML doesn't.

I separated the tests into with- and without-attribute use; fixed a bug
where the triple was being output both as an attribute and an element, and
restored the original simple example it was based on.

Thanks for finding and working on this!


Reply to this email directly or view it on GitHub
#34 (comment).

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

Successfully merging this pull request may close these issues.

None yet

2 participants