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

Views content rewrite text says "You may include HTML" but actually allows only a subset

$
0
0

Problem/Motivation

Steps to reproduce:

  • edit a view
  • edit an existing field
  • expand Rewrite Rules fieldset
  • tick 'Override the output of this field with custom text'
  • this issue refers to the description underneath - "The text to display for this field..."

This is a longstanding issue and there is a (very long) discussion at #853880: Views: Rewrite field, strips some HTML tags (SOLUTION/WORKAROUND FOUND FOR STYLE TAG), but it just bit me again when I tried to put an iframe tag in the rewritten text. Objectionable tags are removed silently, so I wasted some time trying to work out what was going wrong before I remembered that HTML put in here is filtered. I don't want to reopen the discussion about whether or not text input by the admin/developer SHOULD be filtered, but I do think the point made in the other post, that the message under the text box should remind the user that it doesn't mean "Full HTML" and it IS going to be filtered, should be acted upon in Drupal 8.

The current message reads:

The text to display for this field. You may include HTML or Twig. You may enter data from this view as per the "Replacement patterns" below.

Proposed resolution

I think it should read something like:

The text to display for this field. You may include a subset of HTML or Twig. You may enter data from this view as per the "Replacement patterns" below.

"subset of HTML" should be a link (as "Twig" is) to a page explaining what is and is not allowed (and why!).

Remaining tasks

Agree, review.

User interface changes

Description only, no CSS/JS.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 293003

Trending Articles



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