mirror of
https://github.com/docker/docs.git
synced 2026-04-01 08:48:56 +07:00
Commits7e5352f1aeande72030d2c6added automatic generation of page titles and descriptions from the page's content if no front-matter metadata was present. Some pages may include characters that should be escaped before using as a HTML attribute or JSON field. This patch adds escaping to those texts to prevent the HTML or JSON from being invalid. Before this: HTML meta: <meta name="description" content="docker build: The `docker build` command builds Docker images from a Dockerfile and a " context".="" a="" build's="" context="" is="" the="" set="" of="" files="" located="" in="" specified="" `path`="" or="" `url`...."="" /> JSON meta: <script type="application/ld+json">{"@context":"http://schema.org","@type":"WebPage","headline":"docker build","description":"docker build: The `docker build` command builds Docker images from a Dockerfile and a "context". A build's context is the set of files located in the specified `PATH` or `URL`....","url":"https://docs.docker.com/engine/reference/commandline/build/"}</script> After this: HTML meta: <meta name="description" content="docker build: The `docker build` command builds Docker images from a Dockerfile and a "context". A build's context is the set of files located in the specified `PATH` or `URL`...." /> JSON meta: <script type="application/ld+json">{"@context":"http://schema.org","@type":"WebPage","headline":"docker build","description":"docker build: The `docker build` command builds Docker images from a Dockerfile and a \"context\". A build's context is the set of files located in the specified `PATH` or `URL`....","url":"https://docs.docker.com/engine/reference/commandline/build/"}</script> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>