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

fix for notifier.js sending invalid XML #514

Merged
merged 1 commit into from Jul 8, 2013

Conversation

Projects
None yet
3 participants
@mildavw
Contributor

mildavw commented Jul 2, 2013

I'm getting a Self.Errbit error "Nokogiri::XML::SyntaxError: EntityRef: expecting ';'" when one of my apps reports an error. The following is the XML which is invalid at line 11. This fix just wraps the message with CDATA so Nokogiri doesn't try to parse it. Also wrapped the backtrace just in case.

1 <?xml version=\"1.0\" encoding=\"UTF-8\"?>
2 <notice version=\"2.0\">
3   <api-key>xxxx</api-key>
4   <notifier>
5     <name>airbrake_js</name>
6     <version>0.2.0</version>
7     <url>http://airbrake.io</url>
8   </notifier>
9   <error>
10     <class>Error</class>
11     <message>Uncaught Syntax error, unrecognized expression: [href=#bayarea?utm_source=2nd+BayREN+MF+Workshop+Invite+July&utm_campaign=July+workshop+announcement&utm_medium=email]</message>
12     <backtrace>
13       <line method=\"{anonymous}()\" file=\"[PROJECT_ROOT]/assets/vendor-8e6fab5606aee4bf5e34551808868bd7.js\" number=\"17\" />
14     </backtrace>
15   </error>
16   <request>
17     <url>https://multifamily.energyupgradeca.org/local</url>
18     <component>contents</component>
19     <action>show</action>
20     <cgi-data>
21       <var key=\"HTTP_USER_AGENT\">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36</var>
22     </cgi-data>
23   </request>
24   <server-environment>
25     <project-root>https://multifamily.energyupgradeca.org</project-root>
26     <environment-name>production</environment-name>
27   </server-environment>
28 </notice>
@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 95b4c97 on mildavw:master into bf7175e on errbit:master.

coveralls commented Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 95b4c97 on mildavw:master into bf7175e on errbit:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 95b4c97 on mildavw:master into bf7175e on errbit:master.

coveralls commented Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 95b4c97 on mildavw:master into bf7175e on errbit:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 5c2ed54 on mildavw:master into bf7175e on errbit:master.

coveralls commented Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 5c2ed54 on mildavw:master into bf7175e on errbit:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 5c2ed54 on mildavw:master into bf7175e on errbit:master.

coveralls commented Jul 2, 2013

Coverage Status

Coverage remained the same when pulling 5c2ed54 on mildavw:master into bf7175e on errbit:master.

@shingara

This comment has been minimized.

Show comment
Hide comment
@shingara

shingara Jul 3, 2013

Member

You right. Can you rebase it in only one commit please ?

Member

shingara commented Jul 3, 2013

You right. Can you rebase it in only one commit please ?

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 3, 2013

Coverage Status

Coverage remained the same when pulling 6c30142 on mildavw:master into bf7175e on errbit:master.

coveralls commented Jul 3, 2013

Coverage Status

Coverage remained the same when pulling 6c30142 on mildavw:master into bf7175e on errbit:master.

@shingara

This comment has been minimized.

Show comment
Hide comment
@shingara

shingara Jul 8, 2013

Member

Thanks

Member

shingara commented Jul 8, 2013

Thanks

shingara added a commit that referenced this pull request Jul 8, 2013

Merge pull request #514 from mildavw/master
fix for notifier.js sending invalid XML

@shingara shingara merged commit abc2fae into errbit:master Jul 8, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment