🐛 Fix meta tags double quotes escaping

This commit is contained in:
Yann Bertrand 2021-04-05 11:42:18 +02:00
parent 2bc15fe0de
commit 7cb2d44377
7 changed files with 14 additions and 14 deletions

View file

@ -7,9 +7,9 @@ meta:
- property: \\"og:title\\"
content: macOS defaults > Category
- name: \\"description\\"
content: \\"This is a description of the category. It can contain \\\\\\"quotes\\\\\\" and markdown.\\\\n\\\\n- a list item\\"
content: \\"This is a description of the category. It can contain "quotes" and markdown.\\\\n\\\\n- a list item\\"
- property: \\"og:description\\"
content: \\"This is a description of the category. It can contain \\\\\\"quotes\\\\\\" and markdown.\\\\n\\\\n- a list item\\"
content: \\"This is a description of the category. It can contain "quotes" and markdown.\\\\n\\\\n- a list item\\"
- property: \\"twitter:card\\"
content: \\"summary\\"
- property: \\"twitter:image\\"

View file

@ -290,9 +290,9 @@ meta:
- property: \\"og:title\\"
content: macOS defaults > Category > Page
- name: \\"description\\"
content: \\"This is a description of the page. It can contain \\\\\\"quotes\\\\\\" and markdown.\\\\n\\\\n- a list item\\"
content: \\"This is a description of the page. It can contain "quotes" and markdown.\\\\n\\\\n- a list item\\"
- property: \\"og:description\\"
content: \\"This is a description of the page. It can contain \\\\\\"quotes\\\\\\" and markdown.\\\\n\\\\n- a list item\\"
content: \\"This is a description of the page. It can contain "quotes" and markdown.\\\\n\\\\n- a list item\\"
- property: \\"twitter:card\\"
content: \\"summary\\"
- property: \\"twitter:image\\"

View file

@ -1,5 +1,5 @@
const Handlebars = require('handlebars')
Handlebars.registerHelper('json', (string) => {
return JSON.stringify(string)
Handlebars.registerHelper('metaTag', (string) => {
return JSON.stringify(string.replace(/"/g, '"'))
})

View file

@ -4,9 +4,9 @@ meta:
- property: "og:title"
content: macOS defaults > {{{ name }}}
- name: "description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "og:description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "twitter:card"
content: "summary"
- property: "twitter:image"

View file

@ -4,9 +4,9 @@ meta:
- property: "og:title"
content: macOS defaults > {{{ name }}}
- name: "description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "og:description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "twitter:card"
content: "summary"
- property: "twitter:image"

View file

@ -4,9 +4,9 @@ meta:
- property: "og:title"
content: macOS defaults > {{{ name }}} > {{{ title }}}
- name: "description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "og:description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "twitter:card"
content: "summary"
- property: "twitter:image"

View file

@ -4,9 +4,9 @@ meta:
- property: "og:title"
content: macOS defaults > {{{ name }}} > {{{ title }}}
- name: "description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "og:description"
content: {{{ json description }}}
content: {{{ metaTag description }}}
- property: "twitter:card"
content: "summary"
- property: "twitter:image"