Improve FormattableMarkup documentation

Created on 5 October 2015, about 9 years ago
Updated 4 September 2024, 3 months ago

Problem/Motivation

Follow-up to #2570431: Document that certain (non-"href") attribute values in t() and SafeMarkup::format() are not supported and may be insecure β†’

FormattableMarkup warning about use in "<" and ">" of an HTML tag talks about placeholder, use in placeholder string is documented in PlaceholderTrait

Proposed resolution

General improvement of the docs.
Make the warning about use of the object (the string value in the object).

Remaining tasks

<!-- See https://drupal.org/core-mentoring/novice-tasks for tips on identifying novice tasks. Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->

User interface changes

No

API changes

No

Data model changes

No

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
DocumentationΒ  β†’

Last updated 1 day ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States yesct

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • Merge request !8851update docs β†’ (Closed) created by quietone
  • Status changed to Needs review 5 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I tested that latest patch on a local version of api.drupal.org and the formatting was terrible. Looking closer the patch one thing I found is that it was not following the standard for the use of @code/@encode; they need to be on a separate line. So, I started reformatting. And after many rounds of testing I concluded that the examples should not be in the @param section. Those sections aren't designed for that, and as we can see in the existing page the examples are not indented as one would expect. The examples don't display nicely after the @return section either.

    In the end, I decided to put them at the top, it is now a lot easier to work with the examples. Another benefit is that after the first read, this section serves as a handy reference. I have uploaded the output from my local api site for the changes here.

    The changes here were focused on formatting. The content does not review.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Try again to upload the file.

  • Status changed to RTBC 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Had to download this one to review it as gitlab diff made my eyes crossed.

    Reviewing the changes the wording reads fine to me. But not sure know what you meant

    The changes here were focused on formatting. The content does not review.

    But I believe this one may be ready. Going to take a leap of faith.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    The changes here were focused on formatting. The content does not review.

    Oh, that doesn't make sense does it. I meant "I did not review the content'.

    I spent most of the time testing how this would display on api.drupal.org not the actual content.

    • nod_ β†’ committed e5653c11 on 11.x
      Issue #2580505 by yesct, nikitagupta, kgoel, quietone, smustgrave,...
  • Status changed to Fixed 3 months ago
  • πŸ‡«πŸ‡·France nod_ Lille

    Committed e5653c1 and pushed to 11.x. Thanks!

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

Production build 0.71.5 2024