Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pages/domainGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ const itemSort = (a, b) => {

// This handles a few weird cases of raw HTML or over-escaping in the protocol JSON
function parseSafeMarkdown(mdText) {
// Inline codeblocks to doublecheck: IO.StreamHandle, Preload.PreloadingAttemptSource, Preload.RuleSet > backendNodeId, Accessibility.AXValueSource > nativeSource
mdText = mdText.replaceAll('<', '&lt;').replaceAll('>', '&gt;');
// Inline codeblocks to doublecheck: IO.StreamHandle,
// Preload.PreloadingAttemptSource, Preload.RuleSet > backendNodeId,
// Accessibility.AXValueSource > nativeSource.
// Replace LINT comments with an empty string.
mdText = mdText.replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll(/^LINT\..*$\n/gm, '');
const html = marked(mdText, {escape: true});
return html.replaceAll('&amp;lt;', '&lt;').replaceAll('&amp;gt;', '&gt;');
}
Expand Down
Loading