Welcome to Geeklog, Anonymous Thursday, April 18 2024 @ 10:11 pm EDT

Geeklog Forums

br tags when editing stories


geeklog-fan

Anonymous
I am using latest CVS

this code works in lib-common.php:
function COM_article( $A, $index='', $storytpl='storytext.thtml' )

this doesn't work:
function COM_article( &$A, $index='', $storytpl='storytext.thtml' )

the only difference is the &

but when editing an article there are BR tags (plain text), the tags just appear. I didn't use them when I posted the story and I didn't use html mode

how come? I've mentioned this in IRC chat before..
 Quote

geeklog-fan

Anonymous
the fix of today seems to have worked for stories posted in plain old text WITHOUT any images attached to the post, but when there is an image used with the specially formatted text like [imageX], the br tags are still there in the edit screen and when viewing the story (NOT edit), a part of the html code (however not used when you posted the story) is visible in the text. This is not the case when you've posted a story in html mode.

I think this is caused by this code:
$A['introtext'] = nl2br( COM_makeClickableLinks( $A['introtext'] ));
$A['bodytext'] = nl2br( COM_makeClickableLinks( $A['bodytext'] ));


because the old code is working fine:
$A['introtext'] = nl2br( $A['introtext'] );
$A['bodytext'] = nl2br( $A['bodytext'] );
 Quote

All times are EDT. The time is now 10:11 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content