jekyll-cloudinary
jekyll-cloudinary copied to clipboard
alt and caption management: special chars
Alternative text and caption may contain special characters: quotes, HTML code (for caption). I've found a workaround to escape quotes and apostrophe:
{% capture img_alt %}L'intérieur de l'église de Château-L'Évèque{% endcapture %}
{% capture img_caption %}Jacques Bodin, "Église de Château-L'Évèque", cc-by-2.0{% endcapture %}
{% cloudinary {{ img_path }} alt="{{ img_alt | escape }}" caption="{{ img_caption | markdownify }}" %}
But I can't figure out how to make the tag work when the caption contains HTML code.
The caption is already parsed for Markdown: https://github.com/nhoizey/jekyll-cloudinary/blob/master/lib/jekyll/cloudinary.rb#L162-L165
What kind of HTML would you like to add, that you can't write as Markdown?
Tried this as caption :
A "test" at [Google](https://www.google.com "Google Search Engine")