Hi,

Our site name contained some special chars that made the google news xml invalid. So I made a small change that passes the site name through htmlentities. That might help also others since a single "&" char in the site name could make the xml invalid:

$content .= '<n:name>' . htmlentities(variable_get('site_name', 'Drupal')) . '</n:name>';

cheers

Comments

jaytennier’s picture

Title: htmlentities for site name » Proper XML escaping for site name
Version: 6.x-1.4 » 7.x-1.4
Category: task » bug
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new728 bytes

This is still a problem in the Drupal 7 version so rather than create a new issue I'm just bumping up the version number. Attached is a patch that fixes the issue in 7.x-1.4 and can easily be backported to 6.x. The only difference from the OP's solution is that I'm using check_plain().

damienmckenna’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
StatusFileSize
new421 bytes

Due to other changes going on in the module, this is even simpler now.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

damienmckenna’s picture

Status: Fixed » Patch (to be ported)

Needs to be backported to D6.

damienmckenna’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
damienmckenna’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Patch (to be ported) » Fixed

The D6 version is no longer supported. Sorry folks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.