Based on #244904: UMN usability: Rename 'input formats', this patch suggests renaming input formats to reflect their purpose. This should be looked at in the context of "Input formats" being renamed to "Text filtering".

Filtered HTML => Safe HTML
Full HTML => Unfiltered HTML

Comments

floretan’s picture

Note 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.

catch’s picture

Nice 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'?

floretan’s picture

"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.

gábor hojtsy’s picture

@flubruit: I understand your reasoning there, but I agree with catch that "Safe HTML" sounds like it is secure, while there is no guarantee.

floretan’s picture

StatusFileSize
new7.6 KB

Ok, you convinced me. Here's a patch using "Restricted HTML" instead of "Safe HTML".

keith.smith’s picture

Status: Needs review » Needs work

I 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:

-  db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Filtered HTML', ',1,2,', 1);
-  db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Full HTML', '', 1);
+  db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Restricted HTML', ',1,2,', 1);
+  db_query("INSERT INTO {filter_formats} (name, roles, cache) VALUES ('%s', '%s', %d)", 'Unfiltered HTML', '', 1);
  • I agree totally that "Full HTML" is bad.
  • I don't mind "Filtered HTML", though something like "Filter HTML tags" is better, IMO.
  • "Restricted HTML" and "Unfiltered HTML" are not parallel at all. The two conditions should have a relationship to one another. If we say "Restricted" we should say "Unrestricted". For this reason, I'm setting to CNW.

I *think* I might prefer something like "Filter HTML tags" and "Do not filter HTML tags".

floretan’s picture

Status: Needs work » Needs review

I 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.

catch’s picture

I 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.

pwolanin’s picture

Can we call it "Unfiltered (unsafe) HTML"?

BioALIEN’s picture

The two conditions should have a relationship to one another. If we say "Restricted" we should say "Unrestricted".

I'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.

alexanderpas’s picture

+1 for Restricted/Unrestricted

drawk’s picture

StatusFileSize
new7.73 KB

Patch no longer applied. Reroll attached, with "Unfiltered" changed to "Unrestricted".

damien tournoud’s picture

I agree with #9 and #10. Couldn't we have "Unrestricted (unsafe) HTML"?

catch’s picture

StatusFileSize
new7.75 KB

system_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.

BioALIEN’s picture

I 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.

catch’s picture

Crossposted 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.

gaele’s picture

+1 and patch applies.
-1 on using "Safe". What does "safe" mean anyway. It's too vague.

floretan’s picture

Status: Needs review » Postponed

I agree with Catch's proposal to move input format definition to install profiles, in which case this can be handled later.

catch’s picture

Status: Postponed » Needs review

Actually 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.

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

dww’s picture

I'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.

sun’s picture

Hm. 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"

catch’s picture

'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.

alexanderpas’s picture

how about:
- "Restricted HTML"
- "Unsecured HTML"

ultimateboy’s picture

Status: Needs work » Closed (duplicate)
ultimateboy’s picture

Status: Closed (duplicate) » Needs work

Sorry.

catch’s picture

#24 sounds good to me.

drawk’s picture

I'm liking #24 too, FWIW.

bsherwood’s picture

I 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"

David_Rothstein’s picture

Would 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?

alexanderpas’s picture

afaics:

Current Status (with php filter enabled):
- "Restricted HTML"
- "Unsecured HTML"
- "PHP evaluator"

sun’s picture

Version: 7.x-dev » 8.x-dev
bsherwood’s picture

I 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)

wim leers’s picture

Issue summary: View changes
Status: Needs work » Closed (works as designed)

They'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.