search for: in: entire forum this post
you are here: root => Bugs => FIXED => FIXED in 1.034 - long words with no space makes pages long...
member since:
folders:
10
posts:
22
replies:
75

FIXED in 1.034 - long words with no space makes pages long...

this problem has been addressed the text that is displayed as plain text such as titles in the function _nodesforum_display_title()

but for texts that are displayed with display_bb() this issue has been forgotten

wassaa


test: test
post #83 permalink
please login to reply
member since:
folders:
10
posts:
22
replies:
75
ok i finally got a good fix for that.

it was easy to find an already made function to add word wrap everywhere *outside html tags (<>) here: http://php.net/manual/en/function.wordwrap.php

but then i realized that i really didnt want long words to be broken inside of
code:
code:



it has been *corrected by someone from the php team according to the little note under the comment that shows the function

quote
[NOTE BY danbrown AT php DOT net: Contains a bug fix provided by (jaw AT condidact DOT dk) on 02-APR-09 to address an issue where "the last word in a non-html-wrapped string will be omitted."]


so it sounded trustworthy at least that it wont do an infinite loop on my server and kill my entire buziness!!

to make it skip the code that i removed all i had about the code tag (just commented it out for now) in my bbcode function and instead i went to remove all the contents from the quote tag at the beginning of the function. so it makes it skip that nl2br() the rendering of other bbcode tags and well that wordwrap... and put the stuff back in the code tags at the end of the function... a bit like i also do with html and quote tags already...

and thats it, it now works.. long words in the text are cut off at 60 chars and continue on the next line, but code is not touched

and that fix will be available in 1.034, which will be available sometime today.

wassaa


test: test
post #133 permalink
please login to reply

moderators of this post

envis (level: ∞)
powered by Nodesforum