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

img tags within links are encoded as HTML entities #13

Open
simontaurus opened this issue Jun 15, 2023 · 0 comments
Open

img tags within links are encoded as HTML entities #13

simontaurus opened this issue Jun 15, 2023 · 0 comments

Comments

@simontaurus
Copy link

simontaurus commented Jun 15, 2023

This particular occurs on my instance for badges, e. g.

[![DOI](https://zenodo.org/badge/458130867.svg)](https://zenodo.org/badge/latestdoi/458130867)\

generates

<a rel="nofollow" class="external text" href="https://zenodo.org/badge/latestdoi/458130867">&lt;img src="https://zenodo.org/badge/458130867.svg" alt="DOI" /&gt;</a>

instead of

<a rel="nofollow" class="external text" href="https://zenodo.org/badge/latestdoi/458130867"><img src="https://zenodo.org/badge/458130867.svg" alt="DOI" /></a>

Setting $escape = true solves the problem (see docs) - would that be a solution?

return Linker::makeExternalLink($cleanUrl, $text, true, $linkType, $parser->getExternalLinkAttribs($url), $parser->getTitle());

simontaurus added a commit to OpenSemanticLab/WikiMarkdown that referenced this issue Jun 16, 2023
within links for image-links like badges

Refs: kuenzign#13
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