Commit da0ccdb5e3d99f7faa6ed0cef8fd711a33fe1e6c
Exists in
master
and in
1 other branch
Merge pull request #565 from mildavw/master
Treat request URL as CDATA so query string params don't result in invalid XML
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
public/javascripts/notifier.js
... | ... | @@ -506,7 +506,7 @@ printStackTrace.implementation.prototype = { |
506 | 506 | '<backtrace>{backtrace_lines}</backtrace>' + |
507 | 507 | '</error>' + |
508 | 508 | '<request>' + |
509 | - '<url>{request_url}</url>' + | |
509 | + '<url><![CDATA[{request_url}]]></url>' + | |
510 | 510 | '<component>{request_component}</component>' + |
511 | 511 | '<action>{request_action}</action>' + |
512 | 512 | '{request}' + | ... | ... |
spec/fixtures/hoptoad_test_notice.xml
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 | </backtrace> |
88 | 88 | </error> |
89 | 89 | <request> |
90 | - <url>http://example.org/verify</url> | |
90 | + <url><![CDATA[http://example.org/verify/cupcake=fistfight&lovebird=doomsayer]]></url> | |
91 | 91 | <component>application</component> |
92 | 92 | <action>verify</action> |
93 | 93 | <params> | ... | ... |
spec/models/error_report_spec.rb
... | ... | @@ -85,7 +85,7 @@ describe ErrorReport do |
85 | 85 | end |
86 | 86 | |
87 | 87 | it 'has request' do |
88 | - subject.request['url'].should == 'http://example.org/verify' | |
88 | + subject.request['url'].should == 'http://example.org/verify/cupcake=fistfight&lovebird=doomsayer' | |
89 | 89 | subject.request['params']['controller'].should == 'application' |
90 | 90 | end |
91 | 91 | ... | ... |