Problem/Motivation

fieldFilterXss method is documented as returing a SafeMarkup object, that's why we get the PhpStorm warning when trying to use the filtered string as a string.

Proposed resolution

Change the @return typehint to \Drupal\Core\Field\FieldFilteredMarkup which is what is returned.

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sasanikolic’s picture

Status: Active » Needs review
FileSize
530 bytes
mgifford’s picture

Re-uploading patch for the bots.

dawehner’s picture

Status: Needs review » Needs work

The right return value is \Drupal\Core\Field\FieldFilteredMarkup

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

juanjesustrigo’s picture

Assigned: Unassigned » juanjesustrigo

I'll work on this

juanjesustrigo’s picture

Status: Needs work » Needs review
FileSize
532 bytes
562 bytes

I have made the changes explained in #3

juanjesustrigo’s picture

Assigned: juanjesustrigo » Unassigned
dawehner’s picture

Component: field system » documentation
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

I updated the issue summary with the actual implemented solution.

I just changed it to documentation, not sure we still do that kind of component moving though. Don't be mad at me :)

alexpott’s picture

Title: Change the return of fieldFilterXss to string » Change the return of fieldFilterXss to FieldFilteredMarkup
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 163b510 to 8.4.x and 212818c to 8.3.x. Thanks!

  • alexpott committed 163b510 on 8.4.x
    Issue #2504607 by juanjesustrigo, sasanikolic, mgifford, dawehner:...

  • alexpott committed 212818c on 8.3.x
    Issue #2504607 by juanjesustrigo, sasanikolic, mgifford, dawehner:...

Status: Fixed » Closed (fixed)

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