Is it possible to create a new markdown render in the future? #644
-
Description Example $markdown = <<<EOT
```html
<?php
class A() {}
?>
<script>alert('safe')</script>
```
<script>alert('XSS')</script>
EOT;
$commonMask = new CommonMarkConverter(
['html_input' => 'strip', 'allow_unsafe_links' => false],
);
$cleanedMarkdown = $commonMask->convertToMarkdown($markdown);
echo $cleanedMarkdown; // String
// Expect output:
'''
```html
<?php
class A() {}
?>
<script>alert('safe')</script>
```
''' |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Found a similar issue #141 |
Beta Was this translation helpful? Give feedback.
-
Can you save the Markdown document in a database and then re-render it later when it is changed? |
Beta Was this translation helpful? Give feedback.
-
Yes, I changed my workflow, return the original content to owener, and return the parsed content to the other users.Thx a lot! |
Beta Was this translation helpful? Give feedback.
Can you save the Markdown document in a database and then re-render it later when it is changed?