erusev / parsedown-extra

Markdown Extra Extension for Parsedown
MIT License
822 stars 124 forks source link

Video HTML tag does not work #168

Open hxii opened 3 years ago

hxii commented 3 years ago

For example, using the following HTML block in the text is causing an error:

<video controls width="450">
    <source src="[source]"
            type="video/webm">
    Sorry, your browser doesn't support embedded videos.
</video>

Error:

127.0.0.1:50013 [500]: /speed-pt3 - Uncaught TypeError: Argument 1 passed to DOMNode::removeChild() must be an instance of DOMNode, null given in /Users/paul/git/saisho_v3/Classes/02_ParsedownExtra.php:484
Stack trace:
#0 /Users/paul/git/saisho_v3/Classes/02_ParsedownExtra.php(484): DOMNode->removeChild(NULL)
#1 /Users/paul/git/saisho_v3/Classes/02_ParsedownExtra.php(232): ParsedownExtra->processTag('')
#2 /Users/paul/git/saisho_v3/Classes/03_ParsedownExtended.php(1099): ParsedownExtra->blockMarkupComplete(Array)
#3 /Users/paul/git/saisho_v3/Classes/01_Parsedown.php(52): ParsedownExtended->linesElements(Array)
#4 /Users/paul/git/saisho_v3/Classes/01_Parsedown.php(26): Parsedown->textElements('>This entry (an...')
#5 /Users/paul/git/saisho_v3/Classes/02_ParsedownExtra.php(46): Parsedown->text('\n>This entry (a...')
#6 /Users/paul/git/saisho_v3/Classes/03_ParsedownExtended.php(1267): ParsedownExtra->text('\n>This entry (a...')
#7 /Users/paul/git/saisho_v3/Classes/03_ParsedownExtended.php(1284): ParsedownExtended->body('\n>This entry (a...')
#8 /U in /Users/paul/git/saisho_v3/Classes/02_ParsedownExtra.php on line 484