Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alt and caption management: special chars #31

Open
borisschapira opened this issue Dec 14, 2017 · 2 comments
Open

alt and caption management: special chars #31

borisschapira opened this issue Dec 14, 2017 · 2 comments

Comments

@borisschapira
Copy link
Contributor

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.

@nhoizey
Copy link
Owner

nhoizey commented Dec 15, 2017

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?

@borisschapira
Copy link
Contributor Author

borisschapira commented Dec 18, 2017

Tried this as caption :

A "test" at [Google](https://www.google.com "Google Search Engine")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants