Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292926

Use Xss::filter for view title to ensure preview matches match display

$
0
0

Problem/Motivation

The views title is run through Xss::filter on render, but not in the preview, so some tags (e.g. <b>) will work in the preview but will not be displayed.

The preview should get Xss::filter to match the display behaviour.

Steps to reproduce

  1. Install Drupal
  2. Create a view with a block, adding <b></b> tags around the view title
  3. Confirm the view title is bold in the preview
  4. Save
  5. Add the block to the layout
  6. View the block, see that the title is not bold

Proposed resolution

Ensure that Xss::filter is applied to the preview output to match the display.

Remaining tasks

  1. Write a patch, with tests
  2. Review

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Original report by jjgw

What are the steps required to reproduce the bug?

  • create a new view block
  • enter the block title like "Recent blog links " and set this title between html tags for bold (or any other)

What behavior were you expecting?

  • The title is showed in bold both in the preview as when published

What happened instead?

  • The title is showed in bold in the preview
  • The title is not showed in bold when published

see attached images


Viewing all articles
Browse latest Browse all 292926

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>