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,7 +506,7 @@ printStackTrace.implementation.prototype = { | ||
506 | '<backtrace>{backtrace_lines}</backtrace>' + | 506 | '<backtrace>{backtrace_lines}</backtrace>' + |
507 | '</error>' + | 507 | '</error>' + |
508 | '<request>' + | 508 | '<request>' + |
509 | - '<url>{request_url}</url>' + | 509 | + '<url><![CDATA[{request_url}]]></url>' + |
510 | '<component>{request_component}</component>' + | 510 | '<component>{request_component}</component>' + |
511 | '<action>{request_action}</action>' + | 511 | '<action>{request_action}</action>' + |
512 | '{request}' + | 512 | '{request}' + |
spec/fixtures/hoptoad_test_notice.xml
@@ -87,7 +87,7 @@ | @@ -87,7 +87,7 @@ | ||
87 | </backtrace> | 87 | </backtrace> |
88 | </error> | 88 | </error> |
89 | <request> | 89 | <request> |
90 | - <url>http://example.org/verify</url> | 90 | + <url><![CDATA[http://example.org/verify/cupcake=fistfight&lovebird=doomsayer]]></url> |
91 | <component>application</component> | 91 | <component>application</component> |
92 | <action>verify</action> | 92 | <action>verify</action> |
93 | <params> | 93 | <params> |
spec/models/error_report_spec.rb
@@ -85,7 +85,7 @@ describe ErrorReport do | @@ -85,7 +85,7 @@ describe ErrorReport do | ||
85 | end | 85 | end |
86 | 86 | ||
87 | it 'has request' do | 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 | subject.request['params']['controller'].should == 'application' | 89 | subject.request['params']['controller'].should == 'application' |
90 | end | 90 | end |
91 | 91 |