Problem/Motivation

The release 4.1.15 that removed raw HTML from the twigs (https://git.drupalcode.org/project/modal_page/-/commit/5060a698ec802075c...) ended up breaking the module's approach for the default close button.

Steps to reproduce

On 4.1.15 or above, create a new modal with the default close option - empty or 'x'.
Observe the modal close button will render as &times instead of the HTML entity ×

Proposed resolution

Send a new variable for the twig so we can print × directly when there is a default close button. This validation happens on the ModalPageService.

Remaining tasks

CommentFileSizeAuthor
#5 twig-changes-3317387-5.patch887 bytesluiscarvalho

Comments

luiscarvalho created an issue. See original summary.

luiscarvalho’s picture

Issue summary: View changes
renatog’s picture

Humm good catch @luiscarvalho

Yeah, we need to take a look on this

P.S. Any patches or MR are welcome

renatog’s picture

Issue tags: +Novice
Parent issue: » #3307178: Plan to next Modal's release
luiscarvalho’s picture

StatusFileSize
new887 bytes

Sending a patch for a quick fix. This can definitely be improved.

luiscarvalho’s picture

Status: Active » Needs review
renatog’s picture

@luiscarvalho looks perfectly acceptable IMHO

Why do you think it can be improved?

renatog’s picture

Status: Needs review » Reviewed & tested by the community

Talked directly with Luis and in the future it can be on PHP side, but for now it's ok and can helps other users, so moving to RTBC

  • 342d5f1 committed on 4.1.x
    Issue #3317387 by luiscarvalho, RenatoG: Default value for close button...
renatog’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Novice

Moved to the dev branch

Thank you so much for your contribution, Luis

renatog’s picture

Status: Fixed » Closed (fixed)

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