Skip to content

Commit 0dcca59

Browse files
authored
Make sure to protect certain characters from markdown or HTML (#3)
Characters like '<', '>', '&' are interpreted by markdown or HTML in "funny" ways. Fortunately, pod2markdown has exactly the option we need to have that protection: > --html-encode-chars > A list of characters to encode as HTML entities. Pass a regexp > character class, or 1 to mean control chars, high-bit chars, and > "<&>"'". > > See "html_encode_chars" in Pod::Markdown for more information. Fixes #openssl/openssl#25407
1 parent a1c666a commit 0dcca59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def convert_pod_to_md(tmp_dir: str):
7070
if "internal" in pod.parent.parts:
7171
continue
7272
target = f"docs/{dir_map[pod.parent.name]}/{pod.stem}.md"
73-
ps = subprocess.run(["pod2markdown", "--man-url-prefix", "../../man", str(pod), target])
73+
ps = subprocess.run(["pod2markdown",
74+
"--html-encode-chars", "1",
75+
"--man-url-prefix", "../../man",
76+
str(pod), target])
7477
if ps.returncode != 0:
7578
raise SystemExit(ps.returncode)
7679

0 commit comments

Comments
 (0)