Skip to content

Commit

Permalink
Allow HTML formatted text within Lightbox captions (#1566)
Browse files Browse the repository at this point in the history
* ensuring no raw html in lightbox captions

* fix display of formatted text and html elements within lightbox captions

Co-authored-by: AnthonyLedesma <anthonymledesma@gmail.com>
  • Loading branch information
jchwenger and AnthonyLedesma committed Jul 13, 2020
1 parent efa5e75 commit b0a1d69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ This list is manually curated to include valuable contributions by volunteers th
| @szepeviktor | @szepeviktor |
| @westonruter | @westonruter |
| @xpurichan | |
| @zrgisa | |
| @zrgisa | |
| @jchwenger | |
2 changes: 1 addition & 1 deletion src/js/coblocks-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
wrapper.style.display = 'flex';
wrapperBackground.style.backgroundImage = `url(${ imagePreloader[ `img-${ index }` ].src })`;
image.src = imagePreloader[ `img-${ index }` ].src;
caption.textContent = imagePreloader[ `img-${ index }` ][ 'data-caption' ];
caption.innerHTML = imagePreloader[ `img-${ index }` ][ 'data-caption' ];
counter.textContent = `${ ( index + 1 ) } / ${ images.length }`;
}

Expand Down

0 comments on commit b0a1d69

Please sign in to comment.