Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Here's my date format:
n.j.Y<b\r /><\e\m>g:ia</\e\m>
Works fine when viewing a full node, however in a view field (list view) this is the output:
4.21.2008<br>&<\04&>12:00pm<!--\04-->
That's clearly not what I intended. LOL
Comment | File | Size | Author |
---|---|---|---|
#2 | date_api.module.patch | 1.2 KB | seanr |
Comments
Comment #1
seanrFigured it out. The problem, is the regexp in date_limit_format (date_api.module:1105) is stripping out all O's Z's P's and e's, regardless of whether they've been escaped or not (all s's simillarly get stripped by 1133). So basically, I need help fixing this regexp to only strip out the letters when not preceded by a \:
'([OZPe])'
Comment #2
seanrHere's a patch thanks to IslandUsurper's kind assistance and superior knowledge of regexps. ;-)
Comment #3
KarenS CreditAttribution: KarenS commentedJust committed this as a part of a bigger project to clean up the way that regex was working. I meant to give credit to IslandUsurper and seanr, but got in too much of a hurry and didn't. Sorry about that, but thanks for the fix. (And sorry it took so long to get to this, it was just less critical than other things I was working on).
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.