- Notifications
You must be signed in to change notification settings - Fork 886
Closed
Labels
bugBug report.Bug report.confirmedConfirmed bug report or approved feature request.Confirmed bug report or approved feature request.extensionRelated to one or more of the included extensions.Related to one or more of the included extensions.
Description
In any of the following source documents:
<div markdown=1> <?php print("foo"); > </div>
<div markdown=1> <?php print("foo"); > </div>
<div markdown=1><?php print("foo"); ></div>
We get the same output:
<div> <p><?php print("foo"); ></p> </div>
Which is correct except for the fact the the opening and closing brackets of the processing instruction (PI) are escaped. We should be getting:
<div> <p><?php print("foo"); ></p> </div>
The problem is related to the fact that the extension builds an etree object of raw HTML when markdown=1
. However, the PI (<?php print("foo"); >
) is simply passed to the etree object as text data (to treebuilder.data
). Upon serialization, it is escaped. The obvious fix would be to pass the content of the PI to treebuilder.pi
, except that xml.etree.ElementTree.TreeBuilder.pi was only added in PY3.8. What do we do for PY3.6 and PY3.7?
Metadata
Metadata
Assignees
Labels
bugBug report.Bug report.confirmedConfirmed bug report or approved feature request.Confirmed bug report or approved feature request.extensionRelated to one or more of the included extensions.Related to one or more of the included extensions.