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 tag in about.md is wrapped in inappropriate anchor tags. #1022

Closed
pastel-blog opened this issue May 6, 2023 · 0 comments
Closed

img tag in about.md is wrapped in inappropriate anchor tags. #1022

pastel-blog opened this issue May 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@pastel-blog
Copy link

NOTE: Before you start, the following should be completed.

  • Read Wiki to understand the usage and the correct effect of functional design.
  • Make sure no similar issue(including closed ones) exists.
  • Make sure the bug is found in the latest code of the master branch.

Describe the bug

After running Jekyll build, an img tag with a src that contains a query string is improperly wrapped in an anchor tag.

<img src="https://img.shields.io/badge/java-007396?style=for-the-badge&logo=java&logoColor=white">

🔽

<a href="white" class="popup img-link"><img data-src="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white" class=" lazyloaded" data-proofer-ignore="" src="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white"></a>

To Reproduce

Steps to reproduce the behavior:

  1. Chirpy with starter https://github.com/cotes2020/chirpy-starter
  2. add the following img tag in _tabs/about.md
    https://github.com/pastel-blog/pastel-blog.github.io/blob/d26fedf391070bc0b66e8841e11cf97aa5ffedcd/_tabs/about.md?plain=1#L14

<img src="https://img.shields.io/badge/java-007396?style=for-the-badge&logo=java&logoColor=white">

(Replacing with markdown syntax ![desc](link) also makes the same problem)

  1. build exec jekyll s
  2. _site/about/index.html
    <a href="white" class="popup img-link"><img data-src="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white" class=" ls-is-cached lazyloaded" data-proofer-ignore="" src="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white"></a>

The href value is extracted from the last query string parameter of the image link.

Expected behavior

It should not be wrapped in tag, or should be wrapped properly.

For example,

<a href="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white" class="popup img-link"><img data-src="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white" class=" ls-is-cached lazyloaded" data-proofer-ignore="" src="https://img.shields.io/badge/java-007396?style=for-the-badge&amp;logo=java&amp;logoColor=white"></a>

Logs/Screenshots

My about.md https://github.com/pastel-blog/pastel-blog.github.io/blob/main/_tabs/about.md
The about page of my github.io pages after build https://pastel-blog.github.io/about/

Environment

This is my local environment. But same problem happens in github deployment.

Command Version
ruby -v 3.2.2
gem -v 3.4.12
bundle -v 2.4.12
bundle exec jekyll -v 4.3.2
bundle info jekyll-theme-chirpy jekyll-theme-chirpy (5.6.1)

Additional context

@cotes2020 cotes2020 added the bug Something isn't working label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants