mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 12:27:52 -05:00
14cd8f5479
Migrate rest of the scripts to esm GitOrigin-RevId: 421f3ccd15342d34113be8d22e343d08533177ea
32 lines
1.6 KiB
Markdown
32 lines
1.6 KiB
Markdown
# Usage
|
|
|
|
```
|
|
node scripts/learn/checkSanitize/index.mjs https://LEARN_WIKI
|
|
```
|
|
|
|
## Bulk export
|
|
|
|
There is a bulk export for media wiki pages, but it produces different
|
|
html escaping compared to the regular parse API we use in web.
|
|
|
|
The bulk export does not escape all the placeholder HTML-like elements,
|
|
like `<project-id` or `<document goes here>`.
|
|
|
|
## Example output
|
|
|
|
Here is how a missing tag gets flagged:
|
|
|
|
```
|
|
---
|
|
page : MediaWiki markup for the Overleaf support team
|
|
title : MediaWiki markup for the Overleaf support team
|
|
match : false
|
|
toText : false
|
|
text : "Overleaf</strong></td>\n </tr>\n <tr><td>Kb/<strong>TITLE_SLUG</strong></td><td><nowiki>https://www.overleaf.com/learn/how-to/</nowiki><strong>TITLE_SLUG</strong></td>\n </"
|
|
sanitized : "Overleaf</strong></td>\n </tr>\n <tr><td>Kb/<strong>TITLE_SLUG</strong></td><td><nowiki>https://www.overleaf.com/learn/how-to/</nowiki><strong>TITLE_SLUG</strong></td>\n "
|
|
textToText : " \n \n \n \n MediaWiki page\n Maps to on Overleaf\n \n Kb/TITLE_SLUGhttps://www.overleaf.com/learn/how-to/TITLE_SLUG\n "
|
|
sanitizedToText: " \n \n \n \n MediaWiki page\n Maps to on Overleaf\n \n Kb/TITLE_SLUG<nowiki>https://www.overleaf.com/learn/how-to/</nowiki>TITLE"
|
|
```
|
|
|
|
Note the hidden/escaped `<nowiki>` element.
|
|
In addition to the side-by-side comparison of HTML you will see a plain-text diff.
|