Skip to content

Commit

Permalink
Fixed bug with special characters in the slide title
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Nov 20, 2020
1 parent 047b489 commit b5108bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Resources/contao/templates/rsts_default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
}
}
if (!empty($slide['title'])) {
$attributes[] = 'data-rsts-name="' . $slide['title'] . '"';
$attributes[] = 'data-rsts-name="' . \Contao\StringUtil::specialchars($slide['title']) . '"';
}
if (!empty($slide['centerContent'])) {
if ($slide['centerContent'] === 'false') {
Expand Down Expand Up @@ -147,7 +147,7 @@
?>

<?php if ($loadLazy): ?>
<script type="text/html"<?php if (!empty($slide['title'])): ?> data-rsts-name="<?= $slide['title'] ?>"<?php endif ?><?php if (!empty($slide['thumb']->src)): ?> data-rsts-thumb="<?= $slide['thumb']->src ?>"<?php endif ?><?php if ($thumbHtml): ?> data-rsts-thumb-html="<?= $thumbHtml ?>"<?php endif ?>>
<script type="text/html"<?php if (!empty($slide['title'])): ?> data-rsts-name="<?= \Contao\StringUtil::specialchars($slide['title']) ?>"<?php endif ?><?php if (!empty($slide['thumb']->src)): ?> data-rsts-thumb="<?= $slide['thumb']->src ?>"<?php endif ?><?php if ($thumbHtml): ?> data-rsts-thumb-html="<?= $thumbHtml ?>"<?php endif ?>>
<?php ob_start() ?>
<?php endif ?>

Expand Down Expand Up @@ -179,7 +179,7 @@
}
else {
$lightboxUrls[] = array(TL_FILES_URL . $slide['image']->singleSRC, $slide['title']);
$attributes .= ' href="' . TL_FILES_URL . $slide['image']->singleSRC . '" data-lightbox="' . substr(md5('mod_rocksolid_slider_' . $this->id), 0, 6) . '" title="' . $slide['title'] . '"';
$attributes .= ' href="' . TL_FILES_URL . $slide['image']->singleSRC . '" data-lightbox="' . substr(md5('mod_rocksolid_slider_' . $this->id), 0, 6) . '" title="' . \Contao\StringUtil::specialchars($slide['title']) . '"';
}
} ?>

Expand Down

0 comments on commit b5108bc

Please sign in to comment.