View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006604CDashpublic2008-03-14 00:152008-03-14 12:02
ReporterStuart Herring 
Assigned ToJulien Jomier 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006604: <![CDATA[ in inline javascript causing problems.
Descriptionin pages with inline javascript, the contents of the output HTML contains CDATA declarations in the body of the <script> tag.
eg:
      <script>
      <![CDATA[
          function doSubmit()
            {
            document.getElementById('url').value = 'catchbot';
            }
       ]]>
       </script>

If the browser doesn't detect that the document is XML (due to it not being served as text/xml), then it tries to send the <![CDATA[ string to the Javascript interpreter directly, causing an error, and resulting in the script not being parsed.
This is most noticeable with the registration form, as it results in the Bot check failing.

A solution to this is suggested in the comments for the transformToXML documentation (http://au2.php.net/manual/en/function.xsl-xsltprocessor-transform-to-xml.php#72519 [^])

Attached is a patch that implements that suggestion.
Additional Informationcdash r718
php 5.2.5, Linux
TagsNo tags attached.
Attached Filesdiff file icon cdash-script.diff [^] (6,388 bytes) 2008-03-14 00:15 [Show Content]

 Relationships

  Notes
(0010805)
Julien Jomier (manager)
2008-03-14 12:02

Path submitted to SVN. Thanks for the report and proposed fix.

 Issue History
Date Modified Username Field Change
2008-03-14 00:15 Stuart Herring New Issue
2008-03-14 00:15 Stuart Herring File Added: cdash-script.diff
2008-03-14 12:00 Julien Jomier Status new => assigned
2008-03-14 12:00 Julien Jomier Assigned To => Julien Jomier
2008-03-14 12:02 Julien Jomier Status assigned => closed
2008-03-14 12:02 Julien Jomier Note Added: 0010805
2008-03-14 12:02 Julien Jomier Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team