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

meta tags aren't being escaped in build, producing broken HTML #2831

Closed
1 task done
runofthemillgeek opened this issue Apr 19, 2021 · 1 comment · Fixed by #2832
Closed
1 task done

meta tags aren't being escaped in build, producing broken HTML #2831

runofthemillgeek opened this issue Apr 19, 2021 · 1 comment · Fixed by #2832

Comments

@runofthemillgeek
Copy link
Contributor

  • I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

  1. Create a new VuePress project with the default theme
  2. Add frontmatter with description set to some HTML in a markdown file
  3. Run yarn dev, notice no issues
  4. Run yarn build and open the HTML page, notice broken HTML

I have a reproduction available here: https://github.com/sangeeth96/bug-vuepress-meta-description-repro

What is expected?

Meta tag contents are escaped before being added to HTML.

What is actually happening?

Meta tag contents aren't being escaped resulting in broken HTML.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
    Environment Info:
    
    System:
     OS: macOS 11.2.3
     CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Binaries:
     Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
     Yarn: 1.22.10 - /usr/local/bin/yarn
     npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
    Browsers:
     Chrome: 90.0.4430.72
     Edge: Not Found
     Firefox: Not Found
     Safari: 14.0.3
    npmPackages:
     @vuepress/core:  1.8.2 
     @vuepress/theme-default:  1.8.2 
     vuepress: ^1.3.1 => 1.8.2 
    npmGlobalPackages:
     vuepress: Not Found
    
@runofthemillgeek
Copy link
Contributor Author

I've got a PR to fix this #2832 (if this is all valid). Wasn't sure how to add test for this but I can try if someone could give me a hint.

runofthemillgeek pushed a commit to vuejs-in/vue-bangalore that referenced this issue Apr 20, 2021
runofthemillgeek pushed a commit to vuejs-in/vue-bangalore that referenced this issue Apr 20, 2021
* meetup31: add musthaq

* fix: workaround for vuejs/vuepress#2831
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

Successfully merging a pull request may close this issue.

1 participant