Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
editor.module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Sep 2014 at 12:38 UTC
Updated:
11 Oct 2014 at 07:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tstoecklerSo, it seems
editorXssFilterClassis a pretty poor variable name if it in fact does not contain a class?!Comment #3
martin107 commentedOk so that taught me a lesson!!! Here is plan B
We have a variable defined in setup() to be a string constant and read in ONLY one place to where it is concatenated with another string constant!!!!!
This should conventually be reduced to just one in-line string constant.
But I am reading the intent of the original developer.. and seeing that the way of doing things is primed for extension.
So I am just refining the poorly name variable and clearing the lint error.
editorXssFilterClass becomes filterUnderTest
and I've added some annotations so the next programmer can see at a glance the intent..
Comment #4
martin107 commentedComment #5
wim leersThanks!
This is indeed odd. It's because I copy/pasted bits of code from
editor_filter_xss(), which uses that same variable name.However, in this test, which tests only
\Drupal\editor\EditorXssFilter\Standard, we should just hardcode\Drupal\editor\EditorXssFilter\Standardand remove the variable altogether.Comment #6
martin107 commentedSimplifled.
Comment #7
martin107 commentedComment #8
wim leersThanks!
Comment #9
wim leersComment #10
webchickCommitted and pushed to 8.x. Thanks!