Sibbe's avatar
Level 1

Upload a File with HTML Code and edit it

If a file is uploaded that contains html code, it should be output editably in a text field. How can I do this?

0 likes
3 replies
Sergiu17's avatar
Sergiu17
Best Answer
Level 60
$html = "<html>. . .</html>";

<textarea>
    <?= htmlspecialchars($html); ?>
</textarea>
1 like
jlrdw's avatar

You need something like htmlpurifier. And probably put it in a text area.

1 like

Please or to participate in this conversation.