Since the convertor uses DOMDocument internally, output needs to be sanitised. This happens in HtmlConvertor::sanitize. Unfortunately, this step may also strip content, as is shown in the following example.
Input:
<pre><code>...
<script type = "text/javascript">
function startTimer() {
var tim = window.setTimeout("hideMessage()", 5000)
}
</head>
<body>
...</pre></code>
Actual
...
<script type = "text/javascript">
function startTimer() {
var tim = window.setTimeout("hideMessage()", 5000)
}
...
Expected
...
<script type = "text/javascript">
function startTimer() {
var tim = window.setTimeout("hideMessage()", 5000)
}
</head>
</body>
...
Since the convertor uses
DOMDocument
internally, output needs to be sanitised. This happens inHtmlConvertor::sanitize
. Unfortunately, this step may also strip content, as is shown in the following example.Input:
Actual
Expected