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 #24

Open
mavaddat opened this issue Oct 27, 2021 · 2 comments
Open

alt and caption management: special chars #24

mavaddat opened this issue Oct 27, 2021 · 2 comments

Comments

@mavaddat
Copy link
Owner

From jekyll-cloudinary created by borisschapira: nhoizey#31

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.

@mavaddat
Copy link
Owner Author

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?

@mavaddat
Copy link
Owner Author

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

1 participant