If a token used by the 'Automatic Nodetitles' module contains special characters like an apostrophe (', HTML: '/' or ’/’), the automatic generation of the node titles breaks. Error message from watchdog log:

article: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/drupal/sites/all/modules/auto_nodetitle/auto_nodetitle.module(220) : eval()'d code on line 7 has been added.

The created node title will look like this:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/drupal/sites/all/modules/auto_nodetitle/auto_nodetitle.module(220) : eval()'d code on line 7

Ugly, isn't it? Obviously a title like this will break all kinds of other things, e.g. sorting by node title. Since characters like the apostrophe are not too uncommon, it's quite impossible to avoid them to show up in tokens (like "Drupal's greatest accomplishments" ;). So the only workaround for this is to make the node title editable for manual correction (which tends to break other site logic, e.g. consistency of user generated content).

So please fix this, if possible ;)

Thanks & greetings, -asb

Comments

bdsl’s picture

This looks like the same issue as, or at least closely related to, #1071596: HTML Special characters in node title and #1071596: HTML Special characters in node title.

mvc’s picture

I think this will only happen when using -raw tokens. Other tokens will be escaped properly (hence the problems in #1071596: HTML Special characters in node title and #878570: Do not sanitize title in function _auto_nodetitle_patternprocessor).

gaurav.kapoor’s picture

Issue summary: View changes
Status: Active » Fixed
gaurav.kapoor’s picture

Status: Fixed » Closed (fixed)

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