dotproject / dotProject

Stable 2 series
Other
207 stars 106 forks source link

When I edit an existing project the html displays as entities in the quilljs editor, not parsed into rich text #139

Open spanner28 opened 4 years ago

spanner28 commented 4 years ago

The Html is displayed as is with the HTML entities displayed as if it were part of the formatted output. This only happens when editing an existing project.

It is expected that the HTML would be parsed and displayed as rich text in the editor when editing a project.

0B467D8D-9D89-4CF1-A477-F280D0544C86_4_5005_c

spanner28 commented 4 years ago

Please do ignore the actual Html in the editor, it's a bit misleading, this in fact happens when clicking on edit to edit a project, the Html is displayed as-is.

One expects the rich text to be displayed and not the Html.

spanner28 commented 4 years ago

I managed to fix it with html_entities_decode on line 28 of lib/quilljs/richedit.view.php

<div id="<?php echo $this->id ?>-editor-container"><?php echo html_entity_decode($this->content) ?></div>

Before the fix it was just echoing the content.

<div id="<?php echo $this->id ?>-editor-container"><?php echo $this->content ?></div>
jalgan commented 3 years ago

I can't solve this problem you raise (# 28). I do not understand why it does not respond with the proposed solution. It also doesn't work with: html_entity_decode ($ this-> content, ENT_COMPAT | ENT_HTML401, 'UTF-8') I suspect it cannot resolve my connection character set and collations. Is there a solution for this huge addedit.php problem? Thanks