Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Escaping XML entities on strings#6

Open
joshmcarthur wants to merge 1 commit into
datanoise:masterfrom
joshmcarthur:master
Open

Escaping XML entities on strings#6
joshmcarthur wants to merge 1 commit into
datanoise:masterfrom
joshmcarthur:master

Conversation

@joshmcarthur

Copy link
Copy Markdown

First of all, thanks heaps for porting AWS to a usable version of rails - it has really saved me some time getting Rails talking to a SOAP API.

This may be a slightly contentious point, but I found I was having problems using AWS since it was not escaping XML entities - specifically, the & symbol.

My fix is really simple - to escape any HTML characters in a string member of a struct, by wrapping CGI.escapeHTML around the value.to_s in the casting.rb file - which will of course escape HTML any time a string member is being outputted, which in turn should result in valid and well-formed XML being produced.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant