SafeMarkup not found on D9, replace with Html::escape

Created on 25 February 2022, over 2 years ago
Updated 8 September 2023, about 1 year ago

Thank you for a great module!

Problem/Motivation

SafeMarkup not found on D9

Steps to reproduce

Install 2.0.0-alpha1+0-dev on D9, try generating some text with /loremipsum/generate/5/1

Proposed resolution

Use Html::escape instead of SafeMarkup::checkPlain in src/Controller/LoremIpsumController.php

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden jfranzen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡·Brazil luco

    Hello!

    Thank you so much for taking the time to test the module, finding the bug, and proposing a solution!

    I see the problem is a bit more complex - on the one hand, if we resort to using Twig only, all text is escaped automatically. But on the other hand, that introduces a possibility for the template to be overridden, so there's a breach.

    For the time being, I'll be adding your suggestion (and crediting you, of course). Later, though, I plan to add an option for flexibility.

    Good job!

    • luco β†’ committed a5502a99 on 2.0.x
      Issue #3266539 by jfranzen: SafeMarkup not found on D9, replace with...
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024