Override HTML characters for date when the date is used in a title
| Project: | Date |
| Version: | 6.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | bomarmonk |
| Status: | closed |
Jump to:
I am using the rules module to add a date from the node into the title. I can use either the [node:field_date_of_meeting-value] (The raw date value) or [node:field_date_of_meeting-view] (the formatted date) and I end up with HTML characters in my title: <span class="date-display-single">2009/06/11 - 8:30am</span>. This is obviously not desirable, because node titles do not use HTML and instead the HTML characters are printed to the screen. In Drupal 5, I simply deleted these characters from a date theme file (I know, a hack), but now I can't even seem to find the right file to hack to get rid of this problem (probably because Drupal 6 has a variable system that makes theming easier-- although in this case, I'm not sure). I have responded to the requests to add a "raw" html free date token, but there hasn't been much activity on those threads, so I thought I would see if there is an easy way to override this behavior. Thank you for any help!

#1
Related feature requests: http://drupal.org/node/423502 and http://drupal.org/node/598674, both of which I've commented on. But I would also be willing to override these characters if someone can give me some pointers. Thanks again.
#2
Okay, I figured out a fix for using rules on titles with dates. Add another action for the title and place the following code into the action:
<?php echo strip_tags ($node->title) ?>. Easy enough.#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.