WBCE CMS – Way Better Content Editing.
You are not logged in.
Title says it all. If I add a caption containing an apostrophe, the caption is blank after saving.
Offline
will be fixed in the next version of the module.
For a quick fix, open modules/news_img/save_post.php and change line 348
? strip_tags($_POST['picdesc'][$row_id])
to
? $database->escapeString(strip_tags($_POST['picdesc'][$row_id]))
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
Thank you. Thank you to everyone who is involved in this project. Having a gallery in a News post has been a long wish of mine/my clients.
I also just noticed that having an apostrophe in the post DESCRIPTION causes issues. For instance the ALT tag which uses the DESCRIPTION is broken at the apostrophe.
Offline
There is no input fiel description, which one do you mean?
But you're right, if theres an apostrophe in the title, the alt tag of the post link looks like this
alt='Don't'
since all attributes are written in single quotes, so change in the view.php line 287 to
$group_image = "<img src=\"".$group_image."\" alt=\"".$group_title."\" />";
and line 297ff to
if ($post['image'] != "") {
$post_img = '<img src="'.WB_URL.MEDIA_DIRECTORY.'/.news_img/'.$post['post_id'].'/'.$post['image'].'" alt="'.$post['title'].'" />';
} else {
$post_img = '<img src="'.WB_URL.'/modules/news_img/images/nopic.png" alt=""/>';
}
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
I'm referring to the teaser pic in the post loop. In the output html, it shows the alt as:
<img src="https://www.mysite.com/media/.news_img/4/img_20190917_163417_1.jpg" alt="I" ve="" discovered="" a="" new="" love'="">
So the output alt tag is "I" and that's all.
I thought it might have something to do with the fotorama Image Loop:
<img src="[IMAGE]" alt="[DESCRIPTION]" title="[DESCRIPTION]" data-caption="[DESCRIPTION]" />
Where DESCRIPTION is used as the alt.
Offline
For the teaser pic, I've posted the quick fix above. We will fix that in the upcoming version of NWI too.
With the (fotorama) gallery images, there are as far as I see no issues when using an apostrophe.
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
Thank you again!
Offline