Commit 8a9170d8 authored by Rebecca Blundell's avatar Rebecca Blundell
Browse files

Bug 1826948: Stop comment text being saved with extra tags

added flags to loadHTML to stop it adding doctype and body
tags to the comment.

behatnotneeded

Change-Id: I9c9b7fd7f58a6db793212e6f82be56d3d46f3eeb
parent f80330c3
......@@ -1181,7 +1181,7 @@ class ArtefactTypeComment extends ArtefactType {
$dom = new DOMDocument();
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
$dom->loadHTML($comment);
$dom->loadHTML($comment, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$xpath = new DOMXPath($dom);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment