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

HTML structure has wrong structure if title contains double-quote #496

Closed
3 tasks done
nhvu1988 opened this issue Jan 22, 2022 · 1 comment · Fixed by ivan-penchev/penchev-com#7
Closed
3 tasks done
Labels
bug Something isn't working
Milestone

Comments

@nhvu1988
Copy link

nhvu1988 commented Jan 22, 2022

Checklist

  • I have read the tutorials and know the correct effect of the functional design.
  • There are no similar reports on existing issues (including closed ones).
  • I found the bug on the latest code of the master branch.

Describe the bug

Create a new post with a title contains double-quote

---
title: 'This is title contains "double quote"'
---

Run build and test command (in deploy.sh) will see the error.

Running ["ScriptCheck", "LinkCheck", "ImageCheck", "HtmlCheck"] on ["_site"] on *.html...


Attribute set `<a href="https://twitter.com/intent/tweet?text=This is title contains " double="" quote"="" -="" boy's="" home&url="http://localhost:4000/posts/on-or-in-a-newspaper/&quot;" data-toggle="tooltip" data-placement="top" title="Twitter" target="_blank" rel="noopener" aria-label="Twitter">
          <i class="fa-fw fab fa-twitter"></i>
        </a>` contains an error!
htmlproofer 3.19.3 | Error:  invalid attribute name `quote"'

Check the index.html will see the wrong structure due to double-quote wasn't html-encoded in line number 4

<div class="share-wrapper">
  <span class="share-label text-muted mr-1">Share</span>
  <span class="share-icons">
        <a href="https://twitter.com/intent/tweet?text=This is title contains "double quote" - Boy's home&url=http://localhost:4000/posts/on-or-in-a-newspaper/" data-toggle="tooltip" data-placement="top"
          title="Twitter" target="_blank" rel="noopener" aria-label="Twitter">
          <i class="fa-fw fab fa-twitter"></i>
        </a>   

To Reproduce

Follow Describe the bug

Expected behavior

The double-quote should be html-encoded

Screenshots

-- no need

Software

  • Ruby version: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
  • Gem version: 3.1.2
  • Bundler version: Bundler version 2.3.5
  • Jekyll version: 4.2.1
  • Theme version: 5.0.2

Desktop

Smartphone

Additional context

@github-actions
Copy link

👋 Hi @nhvu1988,

This issue is being automatically closed because it does not follow the issue template. Please DO NOT open another similar issue, try to edit the current issue according to the template, then it will be reopened automatically.

@github-actions github-actions bot reopened this Jan 22, 2022
@cotes2020 cotes2020 added the bug Something isn't working label Jan 22, 2022
@cotes2020 cotes2020 added this to the 5.1.0 milestone Jan 22, 2022
linkliu pushed a commit to linkliu/game-tech-post-old that referenced this issue Apr 10, 2022
dkbnz pushed a commit to dkbnz/jekyll-theme-chirpy that referenced this issue Jul 12, 2022
dkbnz pushed a commit to dkbnz/jekyll-theme-chirpy that referenced this issue Jul 12, 2022
shihtiy-tw pushed a commit to shihtiy-tw/shihtiy-tw.github.io that referenced this issue Nov 26, 2022
shihtiy-tw pushed a commit to shihtiy-tw/shihtiy-tw.github.io that referenced this issue Nov 26, 2022
sanjidnet pushed a commit to sanjidnet/sanjidnet.github.io that referenced this issue Jan 9, 2023
sanjidnet pushed a commit to sanjidnet/sanjidnet.github.io that referenced this issue Jan 9, 2023
Ap3x pushed a commit to Ap3x/ap3x.github.com that referenced this issue Feb 23, 2023
Ap3x pushed a commit to Ap3x/ap3x.github.com that referenced this issue Feb 23, 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

Successfully merging a pull request may close this issue.

2 participants