HTML in markdown (extra) file throws error

I tried to put the Piwik-iFrame in my imprint text file. Markdown Extra is activated but if i put some HTML in my textfile i get the following message:

Whoops\Exception\ErrorException thrown with message “Method Kirbytext::__toString() must not throw an exception, caught Error: Class ‘DOMDocument’ not found”
…/helpers.php 0

What’s going wrong?

What does your text file look like? And could you post your template code, please, can’t reproduce this.i

In my template is this call: <?php echo $page->text()->kirbytext() ?>

My text file is a regular markdown .txt-file. Even with just a p-tag inside i get the error message.

Please check out this post and see if it helps: Error: Class 'DOMDocument' not found

sudo apt-get install php-xml

Thank you.