DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:class

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:class [2009-08-07 13:32] achplugin:class [2014-08-11 15:19] (current) – [Description] 217.8.62.177
Line 6: Line 6:
 email      : janusz@ledruide.net email      : janusz@ledruide.net
 type       : syntax type       : syntax
-lastupdate : 2008-12-15+lastupdate : 2009-09-16
 compatible :  compatible : 
 depends    :  depends    : 
 conflicts  conflicts 
 similar    : box similar    : box
-tags       : notes, boxes, css, class, styles+tags       : boxes, style
 ---- ----
  
 ===== Description ===== ===== Description =====
  
-This is a simply plugin to add a class to a content. It prevents to use+This is a simple plugin to add a class to a content. It prevents to use
 <code html> <code html>
 <html></p><div class="myStyleClass"><p></html> <html></p><div class="myStyleClass"><p></html>
Line 38: Line 38:
 Put the following PHP file in /lib/plugins/class/syntax.php Put the following PHP file in /lib/plugins/class/syntax.php
  
-<code php>+<code php syntax.php>
 <?php <?php
 /** /**
Line 119: Line 119:
                          
             case DOKU_LEXER_ENTER :                   case DOKU_LEXER_ENTER :      
-                $renderer->doc .= '</p><div class="'.$match.'"><p>';+                $renderer->doc .= '</p><div class="'.htmlspecialchars($match).'"><p>';
                 break;                 break;
                          
Line 143: Line 143:
 ===== Versions ===== ===== Versions =====
  
 +  * **2009-09-16** : Change ''$match'' to ''htmlspecialchars($match)'' to prevent some malicious code.
   * **2008-12-15** : Change the getType() to convert the inside text in HTML code.   * **2008-12-15** : Change the getType() to convert the inside text in HTML code.
   * **2008-12-08** : First version.   * **2008-12-08** : First version.
Line 149: Line 150:
 ===== Discussion ===== ===== Discussion =====
  
 +How can I define font and other attributes of my class? Can it work in another pages?
  
 +It is not boxes? I cannot use <class class1><class class2>Something</class>Something</class>
plugin/class.1249644730.txt.gz · Last modified: 2009-08-07 13:32 by ach

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki