summaryrefslogtreecommitdiffstats
path: root/system/libraries/Typography.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-09-24 19:19:44 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-09-24 19:19:44 +0200
commit9976587c01b21e96b0b98b4155d72287f8033118 (patch)
tree82a7973669069b8080be821bf109637f01e91b71 /system/libraries/Typography.php
parent4585159f8b39e58b22fa409a1e33e404cfe33777 (diff)
put all valid block level elements into $block_elements array, added table to tags with which <p> should not be directly contained within
Diffstat (limited to 'system/libraries/Typography.php')
-rw-r--r--system/libraries/Typography.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 76160bfe1..eeb507d34 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -27,10 +27,10 @@
class CI_Typography {
// Block level elements that should not be wrapped inside <p> tags
- var $block_elements = 'p|div|blockquote|pre|code|h\d|script|ol|ul|dl|dt|dd';
+ var $block_elements = 'address|blockquote|del|div|dl|fieldset|form|h\d|hr|ins|noscript|ol|p|pre|script|table|ul';
// Elements that should not have <p> and <br /> tags within them.
- var $skip_elements = 'p|pre|ol|ul|dl';
+ var $skip_elements = 'p|pre|ol|ul|dl|table';
// Tags we want the parser to completely ignore when splitting the string.
var $ignore_elements = 'a|b|i|em|strong|span|img|li';
@@ -126,7 +126,7 @@ class CI_Typography {
{
if (preg_match("#".$this->skip_elements."#", $match[2]))
{
- $process = ($match[1] == '/') ? TRUE : FALSE;
+ $process = ($match[1] == '/') ? TRUE : FALSE;
}
$str .= $chunk;