Proposal for change: documentation

figaro - December 15, 2007 - 21:14
Project:Safe HTML
Version:5.x-1.2
Component:Documentation
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

The english could be improved in the module and suggest to change function safehtml_help as follows:

function safehtml_help($section) {
  switch ($section) {
    case 'admin/help#safehtml':
    case 'admin/content/safehtml':
      return
        t('<p>Safe HTML is a module that filters the input and performs code cleaning before the content is stored.</p>') .
        t('<p>Safe HTML must be enabled on the <em>Input formats</em> section to take effect. Safe HTML cannot be used in conjunction with the PHP Parser Filter because Safe HTML will strip any PHP code. Safe HTML can be used together with HTML Filter in order to limit HTML tags to an allowed array.</p>') .
        t('<p>Administrators and allowed users can define custom PHP code to perform additional tasks on the form input. The site administrator can define what kind of custom transformation may occur on the form content and apply these transformations to a variable named <strong>$html</strong>.</p>') .
        t('<p>The module is based on <a href="http://pixel-apes.com/safehtml/">HTML Safe</a> a project lead by Roman Ivanov and strips content of potentially dangerous HTML:</p>') .
        t('<ul><li>opening tag without its closing tag</li><li>closing tag without its opening tag;</li><li>resolving cases like &lt;p&gt;&lt;em&gt;abc&lt;/p&gt;&lt;/em&gt;;</li><li>strip any of these tags: "base", "basefont", "head", "html", "body", "applet", "object", "iframe", "frame", "frameset", "script", "layer", "ilayer", "embed", "bgsound", "link", "meta", "style", "title", "blink", "xml" etc.</li><li>any of these attributes: on*, data*, dynsrc</li><li>javascript:/vbscript:/about: etc. protocols</li><li>expression/behavior etc. in styles</li><li>any other active content</li></ul>') .
        t('<p>It also tries to convert code to XHTML valid, but htmltidy is a better solution for this task.</p>');
  }
}

What this change will achieve:
- syntactical correctness of documentation and overall improvement of legibility
- adherence to code: removed superfluous interlines

#1

claudiu.cristea - January 20, 2008 - 12:10

Thank you figaro,

My english is poor... so your translation is welcomed! Please attach your improvment as patch to this issue. Then I will commit it to CVS.

Claudiu C.

#2

figaro - March 22, 2008 - 21:07

Rolled against 5.x-1.2

AttachmentSize
safehtml.patch 3.67 KB

#3

claudiu.cristea - August 11, 2009 - 10:35
Status:active» fixed

Fixed in http://drupal.org/cvs?commit=249490

#4

claudiu.cristea - August 11, 2009 - 16:32
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.