In #2505497: Support render arrays for drupal_set_message() we adding more tests for SafeStrings in dsm() plus we removed the string cast. This issue we remove the entire safe storing in the message array and use SafeString::create instead so we can remove the SafeMarkup::set() in drupal_get_messages()

CommentFileSizeAuthor
#2 2546176.2.patch6.47 KBalexpott

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new6.47 KB

Less loops and less SafeMarkup::set() - I like it.

alexpott’s picture

xjm’s picture

Status: Needs review » Reviewed & tested by the community

This is great, and also makes #2505497: Support render arrays for drupal_set_message() potentially cleaner.

I think the only potential concern is with storing objects in $_SESSION as per @catch's concerns in #2505497: Support render arrays for drupal_set_message(). However, a SafeString object is definitely a much smaller/safer thing to put there than an entire render array. So I think that's acceptable.

  • catch committed bd1dbf5 on 8.0.x
    Issue #2546176 by alexpott: Use SafeStrings to communicate safeness in...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Yep SafeString is a lot more limited than a render array, so no objections to this and it simplifies things as well.

Committed/pushed to 8.0.x, thanks!

Status: Fixed » Closed (fixed)

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