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.
When I have a timeline in a block, the #039 apostrophe character is being rendered in the title of the timeline event as '#039'. As in "Creation of the Women's Environment and Development Organization".
This doesn't happen with the title as it appears in the vco-navigation area, just in the vco-slider area. And it doesn't happen when I have the timeline as a page view, only, it seems, in a block view.
It's quite annoying, not only because of the display issue but also because the timeline js then renders all words after hash tags as twitter search links!
Can anyone help?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#6 | 2064003-6.patch | 1.99 KB | roderik |
Comments
Comment #1
metabrown CreditAttribution: metabrown commentedI'm also experiencing this problem, but not just in blocks; I'm using the View page that comes with the module. Also more than just apostrophes. Double-quotes, ampersands and greater-than/less-than characters also transmogrify into their character codes equivalents. All looks fine when content is viewed as Drupal view mode...in other words the data is OK. It's just when I render TimelineJS that the characters change. It's only happening for the Title field (aka Headline). As a workaround I'm using Feeds Tamper regex replace to swap out these characters, but that doesn't help for user input nodes, nor is it ideal to replace content this way. Anybody else having this issue? Any fixes? Thanks much.
Comment #2
knigh7 CreditAttribution: knigh7 commentedI confirm that I also have this issue
Comment #3
zincdesign CreditAttribution: zincdesign commentedSame here - apostrophe and ampersands
Comment #4
Andy_Read CreditAttribution: Andy_Read commentedAs a quick fix I've modified my copy to remove check_plain from views_timelinejs_plugin_style_timelinejs.inc line 512. I haven't done a full security analysis of this fix, but in my use case content is carefully moderated so no risk.
Comment #5
roderikThere's no risk. Removing the check_plain() is correct, because actually the check_plain() command was done already - inside render() (line 498).
However, that mans that, to be consistent:
Miscellaneous things added to this patch:
Comment #6
roderikNever mind that last bullet point - split out to a separate patch in #1955816: Support "Global: Custom Text" (where I had to add an extra line).
Comment #7
Naomi79 CreditAttribution: Naomi79 commentedPatch #5 works perfectly with Views TimelineJS 7.x-1.0-alpha1+17-dev. Patch #6 breaks the field mapping in views (all fields disappear from select lists) so the timeline can't work. Thank you all for your contributions.
Comment #8
WorldFallz CreditAttribution: WorldFallz commentedThis should be fixed in the current dev. Also, text field rendering is now completely different (handled by views), so a fix would likely be completely different as well.
If you still encounter the problem, please create a new issue. Thanks.