cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Asked

ImagePlugin breaks captions containing single quotes when used with PublishPlugin

If the caption of an image contains a single quote and you publish that topic using the PublishPlugin, the caption is broken by the addition of the noautolink tags. A workaround hack is to not modify the title:
[root@lnx03 ImagePlugin]# diff Core.pm Core.pm.bk
422c422
< #  $result =~ s/\$title/'<noautolink>'.plainify($params->{title}).'<\/noautolink>'/ge;
---
>   $result =~ s/\$title/'<noautolink>'.plainify($params->{title}).'<\/noautolink>'/ge;

Here's an example comparison of the published version without the hack versus with.
< <div class='imageFrame imageFrame_left ' style='_width:146px;max-width:146px;'><a class='imageHref' title='<noautolink>Cornell's 7-cell superconducting RF cavity.</noautolink>' href='../../../rsrc/Home/NewsAndEvents/SrfNews071010/seven_cell.jpg'><img src='../../../rsrc/Home/NewsAndEvents/SrfNews071010/igp_9699849c01c5d9371c893036d17f84c4_seven_cell.jpg' alt='<noautolink>seven cell.jpg</noautolink>' width='144' height='41'  /></a><div class='imageCaption'> Cornell's 7-cell superconducting RF cavity. </div></div>
---
> <div class='imageFrame imageFrame_left ' style='width:143px;'><a class='imageHref' title='$title' href='../../../rsrc/Home/NewsAndEvents/SrfNews071010/seven_cell.jpg'><img src='../../../rsrc/Home/NewsAndEvents/SrfNews071010/igp_9699849c01c5d9371c893036d17f84c4_seven_cell.jpg' alt='<noautolink>seven cell.jpg</noautolink>' width='144' height='41'  /></a><div class='imageCaption'> Cornell's 7-cell superconducting RF cavity. </div></div>

-- DevinBougie - 05 May 2014

 

QuestionForm edit

Subject Using an extension
Extension ImagePlugin
Version Foswiki 1.1.9
Status Asked
Related Topics
Topic revision: r1 - 05 May 2014, DevinBougie - This page was cached on 17 Sep 2018 - 23:29.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy