Skip to content

Commit

Permalink
Merge pull request #565 from mildavw/master
Browse files Browse the repository at this point in the history
Treat request URL as CDATA so query string params don't result in invalid XML
  • Loading branch information
shingara committed Oct 3, 2013
2 parents b4fc56c + 929e795 commit da0ccdb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/javascripts/notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ printStackTrace.implementation.prototype = {
'<backtrace>{backtrace_lines}</backtrace>' +
'</error>' +
'<request>' +
'<url>{request_url}</url>' +
'<url><![CDATA[{request_url}]]></url>' +
'<component>{request_component}</component>' +
'<action>{request_action}</action>' +
'{request}' +
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/hoptoad_test_notice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</backtrace>
</error>
<request>
<url>http://example.org/verify</url>
<url><![CDATA[http://example.org/verify/cupcake=fistfight&lovebird=doomsayer]]></url>
<component>application</component>
<action>verify</action>
<params>
Expand Down
2 changes: 1 addition & 1 deletion spec/models/error_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def framework
end

it 'has request' do
subject.request['url'].should == 'http://example.org/verify'
subject.request['url'].should == 'http://example.org/verify/cupcake=fistfight&lovebird=doomsayer'
subject.request['params']['controller'].should == 'application'
end

Expand Down

0 comments on commit da0ccdb

Please sign in to comment.