Closed (works as designed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
filter.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
10 Apr 2008 at 17:23 UTC
Updated:
29 Jul 2014 at 17:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
floretan commentedNote that this patch also removes the definition of the 'filter_html_1' variable from system.install, as this variable is not used anywhere in core.
Comment #2
catchNice one getting this running. I'm not 100% on 'safe HTML' though - it's easy to add a few tags and it not be 'safe' any more. Maybe 'restricted HTML'?
Comment #3
floretan commented"restricted" could work, but I chose "safe" because security is the purpose of that filter. If users with proper permissions but no clear understanding of security issues have the option between "unfiltered" and "restricted" HTML, most of them will probably choose "unfiltered" because they don't want to be restricted.
I agree that the "Safe HTML" could be made unsafe by adding a few tags. Maybe we should add a help text to the "allowed HTML tags" configuration to mention that adding tags could potentially make the site insecure.
Comment #4
gábor hojtsy@flubruit: I understand your reasoning there, but I agree with catch that "Safe HTML" sounds like it is secure, while there is no guarantee.
Comment #5
floretan commentedOk, you convinced me. Here's a patch using "Restricted HTML" instead of "Safe HTML".
Comment #6
keith.smith commentedI don't know. I think "Restricted HTML" suffers from almost the same problem as "Safe HTML" as it may describe a condition that does not exist.
Plus, this patch changes to:
I *think* I might prefer something like "Filter HTML tags" and "Do not filter HTML tags".
Comment #7
floretan commentedI mentioned in the original post that this should be looked at in the context of "input formats" being renamed to "text filtering". Turning special placeholders into image is a filter, markdown notation is a filter, inline tags are filters, even my guitar chord diagram module is a filter, so "Filtered HTML" or "Filtered HTML tags" is not specific enough.
I don't believe that "Restricted HTML" suffers from the same problem as "Safe HTML". Even if you add many allowed tags to your settings, your input is still "restricted", but not "safe". Of course you can totally modify your input format, but that wasn't the real concern. I don't know if "Restricted HTML" is the best possible solution, but it's definitely the most accurate one suggested so far, so I'm setting this issue back to CNR.
Comment #8
catchI agree with flobruit - even if you individually specify every html tag there is (including
<blink>and some HTML 3 proprietary stuff), it's still restricted in that tags are opt-in - so say HTML5 adds a new tag, it would be blocked by that format.Comment #9
pwolanin commentedCan we call it "Unfiltered (unsafe) HTML"?
Comment #10
BioALIEN commentedI'm with keith.smith on this one. "Restricted HTML" and "Unrestricted HTML" not only reflect what the actual function of the two filters are, they are also highly meaningful even to non-drupal users.
Comment #11
alexanderpas commented+1 for Restricted/Unrestricted
Comment #12
drawk commentedPatch no longer applied. Reroll attached, with "Unfiltered" changed to "Unrestricted".
Comment #13
damien tournoud commentedI agree with #9 and #10. Couldn't we have "Unrestricted (unsafe) HTML"?
Comment #14
catchsystem_update_7005() is taken so upped to 7010, also did a find and replace in filter.test since that was failing a lot, and ran all tests with the patch applied to check the rest are unaffected.
This ought to be ready now.
Comment #15
BioALIEN commentedI did a visual review, everything looks good - I couldn't nitpick on anything.
I'll let another person apply the patch to ensure it installs/updates and set status to RTBC.
Comment #16
catchCrossposted with Damien.
What about removing 'Unrestricted HTML' from the default install profile altogether? #275815: Fix filter and input format saving moves them out of system.install which is a start. Personally I think this naming is fine and would like to get this in, adding 'unsafe' seems a bit redundant when we could just kill it altogether in a followup patch.
Comment #17
gaele commented+1 and patch applies.
-1 on using "Safe". What does "safe" mean anyway. It's too vague.
Comment #18
floretan commentedI agree with Catch's proposal to move input format definition to install profiles, in which case this can be handled later.
Comment #19
catchActually the install profile issue is currently stalled due to the ugliness with which input formats are created, so I'd rather keep this one open.
Comment #20
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #21
dwwI'm not convinced the two "input formats" need to have a direct relationship to each other (as in "foo" vs "unfoo"). They just both need self-documenting names that end-users are likely to understand. Over at #244904: UMN usability: Rename 'input formats' we have a pretty broad range of agreement on the following:
- Filtered HTML
- Unsafe HTML
Leave "Filtered HTML" alone. It does start life as an "input format" that filters out all HTML tags but a whitelist of allowed tags. Sure, people can reconfigure it to break that, but at least to describe the initial state, "Filtered HTML" is what it is. Even non-technical site admins who don't fully grok the details will at least associate "filtered HTML" with a "filter" and generally "filter" means "selectively take out unwanted stuff", which points them in the right direction.
"Unsafe HTML" is (IMHO) the perfect name for the thing currently called "Full HTML". It's unsafe. That immediately gets end-user site-admins to think twice before granting access to this filter, setting nodes to use it, etc. I don't think "Unrestricted" gets the same message across. "Unrestricted" sounds like like "HTML Unlimited" or something -- more like marketing jargon than a warning to site admins. Furthermore, naming an input format "Unsafe" not only self-documents that particular format, it also self-documents that input formats have to do with security, and can be configured insecurely, and so you better know what you're doing if you go clicking around in there.
So, let's leave "Filtered HTML" alone and just rename "Full HTML" to "Unsafe HTML". I don't see what a "relationship" between the two names buys us in usability.
Comment #22
sunHm. At first sight:
-1 for too similar names, i.e. "(un)restricted HTML": Two easily overlooked characters should not decide on whether something is safe or horribly unsafe (by default).
That said, all of the default formats can only describe what they do by default. If the site admin manages to make "Filtered HTML" unsafe, ... well, this is the wrong issue to debate this.
My vote goes for:
"Restricted HTML"
"Unsafe HTML"
Comment #23
catch'Unsafe HTML' sounds like an input format where you can only enter
<script><object>etc. tags in. At this point I'm leaning towards just removing it from the default install entirely.Comment #24
alexanderpas commentedhow about:
- "Restricted HTML"
- "Unsecured HTML"
Comment #25
ultimateboy commentedComment #26
ultimateboy commentedSorry.
Comment #27
catch#24 sounds good to me.
Comment #28
drawk commentedI'm liking #24 too, FWIW.
Comment #29
bsherwood commentedI think "Filtered HTML" name is accurate and easy to understand. While "Full HTML" doesn't really explain anything. I would go with:
"Filtered HTML"
"Unsecured HTML"
Comment #30
David_Rothstein commentedWould it make sense to rename the "PHP code" format in this issue as well?
The problem with "PHP code" is it sounds like it might be something that produces highlighted PHP code (like the filter in use on the d.o. issue queue), rather than something that executes the PHP code. Those are kinda different things :)
The PHP filter is currently called "PHP evaluator", which seems like a much better name... Maybe the text format can be changed to use that name as well?
Comment #31
alexanderpas commentedafaics:
Current Status (with php filter enabled):
- "Restricted HTML"
- "Unsecured HTML"
- "PHP evaluator"
Comment #32
sunComment #33
bsherwood commentedI like the idea of using one root word and prefixing it with 'un' for consistency sake:
Safe
Unsafe
Restricted
Unrestricted
I also think that 'Execute PHP' is better for 2 reasons:
1) Execute is a powerful word and it would guarantee that users would "stop and think twice" before using it.
2) Because all the HTML/PHP text would be on the right of the adjective. (Yes I realize it is rather pedantic)
Comment #34
wim leersThey've been renamed in D8 — see https://drupal.org/node/1941642.
This discussion is now outdated, if you want to rename the current text formats, then please create a new issue.