Commit 7841fc5
Dolicraft
Fix Dolibarr#38919 keep line breaks around bare < and > in description fields
When MAIN_RESTRICTHTML_ONLY_VALID_HTML is on, dol_htmlwithnojs() wrapped a
plain text in <div> and ran it through DOMDocument::loadHTML. A lone < or >
in the user text (e.g. 'from EUR2.00 > EUR2.50') was interpreted as a tag
boundary, the chunk between them was treated as an unclosed element and the
saveHTML() output lost the line breaks. Pre-escape lone < and > to </>
in the text-only branch before the DOM round-trip, so the parser keeps the
content intact.
Signed-off-by: Dolicraft <contact@dolicraft.com>1 parent 5941291 commit 7841fc5
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7470 | 7470 | | |
7471 | 7471 | | |
7472 | 7472 | | |
7473 | | - | |
| 7473 | + | |
| 7474 | + | |
| 7475 | + | |
| 7476 | + | |
| 7477 | + | |
7474 | 7478 | | |
7475 | 7479 | | |
7476 | 7480 | | |
| |||
0 commit comments