ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

validation error concering empty 'p' tags and 'code' tags

January 28, 2008 6:32pm

Subscribe [2]
  • #1 / Jan 28, 2008 6:32pm

    PanPan

    5 posts

    hi,

    somehow when I insert a ‘code’ tag it inserts a empty ‘p’ before and after;

    it comes down to the core.typography.php were it uses the “Insert the cached code tags”

    tried to alter the settings a bit but it still renders none valid empty ‘p’ tags ... or surrounds the code tag with p tags ;(

    someone having the same problem and solved it?

    thanks in advance !

    gr

  • #2 / Jan 28, 2008 6:45pm

    PanPan

    5 posts

    made a small fix in core.typography.php to get it xhtml valid;

    $str = str_replace('{'.$key.'yH45k02wsSdrp}'."\n
    ", ''.$val.'', $str);
                        $str = str_replace('{'.$key.'yH45k02wsSdrp}', ' '.$val.' ', $str);

    it now renders the empty p tags with a nbsp; only side effect is that the code block consumes more space.
    but I no php guru so if anyone could alter this to not rendering empty tags at all would be great 😉

  • #3 / Jan 28, 2008 7:45pm

    Sue Crocker

    26054 posts

    How where you entering in your code tags?

    [ code ] on one line, and then the actual code following? Or what exactly?

  • #4 / Jan 28, 2008 8:06pm

    PanPan

    5 posts

    Hi Sue,

    love the hot soup video makes me hungry at 1 am in the moring 😉

    I just upgraded to EE 1.6.2 this was not the problem but just that you know were one the same version level ...

    It happens when I enter the

    tag in the extended input field, not using any pluging there like tiny editor etc.

    then the p tags appear before code tag after parsing .. output will look something like;

    
    
    <code> .... 
    </code>

    were as it never renders empty p tag soly whem I enter the code tag ..

    hope this was helpfull

    regards

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases