Download & Extend

XML prolog not filtered correctly

Project:Code Filter
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

try out yourself with this example. the XML prolog closing with ?> and the filter thinks, this is the ending closing PHP tag, what is wrong. i'm using v1.14.2.4.

<?php
  $vars
['xml_prolog'] = <?xml version="1.0" encoding="utf-8"?>
'."\n";
?>

Comments

#1

i tried with 1.14.2.6 and this bug is inside. Aside my code posted here is correctly displayed... looks like Drupal.org is using a different version!??

#2

Status:active» needs review

The typical fix for this situation is to split the ? and >, like this:

<?php
$vars['xml_prolog'] = '<?xml version="1.0" encoding="utf-8"?'.">\n";
?

#3

Oops missing closing brace:

<?php
$vars
['xml_prolog'] = '<?xml version="1.0" encoding="utf-8"?'.">\n";
?>

#4

Status:needs review» closed (duplicate)

See http://drupal.org/node/38047