In the paragraph summary (using the experimental widget) HTML entities such as   are printed. I would expect them to just render as normal white spaces.

Comments

rp7 created an issue. See original summary.

rp7’s picture

Issue summary: View changes
rp7’s picture

Patch attached fixes the issue on my side. It first does a html_entity_decode() before using htmlspecialchars() again.

rp7’s picture

Status: Active » Needs review
falc0’s picture

Updated patch so it applies to the current version.

deepalij’s picture

StatusFileSize
new40.51 KB
new39.77 KB

Applied patch #5 on Drupal 10.1.x-dev
Patch applied cleanly
Able to reproduce the issue

HTML entities issue got fixed after applying the patch
Before patch:
before

After patch:
after

RTBC+1

pivica’s picture

StatusFileSize
new740 bytes

We have the same problem and first I created a patch and then checked for existing issue. A bit different approach, doing decoding in template_preprocess_paragraphs_summary() function. I am not really sure which approach is better, it feels that doing it in preprocessor is a more general approach?

Thinking about spaces, if we have two or more spaces connected should we replace them with one space?

pivica’s picture

Discussed with @Berdir and he prefers approach in #5, dropping mine patch and testing against #5.

berdir’s picture

Status: Needs review » Fixed

Committed.

  • Berdir committed 35a3d557 on 8.x-1.x authored by falc0
    Issue #3160709 by pivica, falc0: Paragraphs summary contains HTML...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.