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!

CommentFileSizeAuthor
#6 2064003-6.patch1.99 KBroderik
#5 2064003-5.patch2.52 KBroderik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

metabrown’s picture

Issue summary: View changes

I'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.

knigh7’s picture

I confirm that I also have this issue

zincdesign’s picture

Same here - apostrophe and ampersands

Andy_Read’s picture

As 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.

roderik’s picture

Status: Active » Needs review
Related issues: +#1894150: broken single quote display, +#1955816: Support "Global: Custom Text"
FileSize
2.52 KB

There'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:

  • the 'global' field (line 495) should also be check_plain()ed
  • if 'link to entity' is turned on, things should also not be double-encoded (line 509)

Miscellaneous things added to this patch:

roderik’s picture

FileSize
1.99 KB

Never 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).

Naomi79’s picture

Patch #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.

WorldFallz’s picture

Status: Needs review » Fixed

This 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.

Status: Fixed » Closed (fixed)

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