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

Unintended attribute behaviour with unescaped tags ? #51

Open
aitherios opened this issue Feb 3, 2015 · 1 comment
Open

Unintended attribute behaviour with unescaped tags ? #51

aitherios opened this issue Feb 3, 2015 · 1 comment

Comments

@aitherios
Copy link

If I write the following code:

Gyoku.xml(tag!: '<p>text<p>', attributes!: {tag: { prop: 1}})

the output is "<tag><p>text<p></tag>", note the property may be missing in the tag

But it works with:

Gyoku.xml(tag!: '<p>text<p>', attributes!: {tag!: { prop: 1}})

output: '<tag prop="1"><p>text<p></tag>'

I would like to ask if this is the intended behaviour before submitting a PR

@tjarratt
Copy link
Contributor

Thanks for opening this issue @aitherios. I'm fairly confident this is unintended behavior. There don't seem to be any good test cases in Gyoku today that describe the behavior of :attributes! along with :tag!.

The correct behavior (if I understand correctly), would be for the first code to include the property, but for it to not escape any xml that may be present in the property. Does that sound right?

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

2 participants