J
Joseph
I have a textBox that people writes stories in it. They can use [bbcode]
[/bbcode] for format.
I have Aspell installed on the server, so people can make correction to
their text. Sometimes, they forget to add a space after a period. So Aspell
reads the last word of a sentence and the first word of the next sentence as
a single world, which gives an error, word not found.
Before sending the text to Aspell, i add a space after all the periods with:
string = string.replace(/./g, ". ");
I did this for the coma, and it's working, no problem.
But i dont want to add a space after periods in certain [bbcode] [/bbcode].
Because the links will not work.
[link]http://www.tromal.net/index3.php[/link]
I dont know how to do it, but after i added a space to all periods, i could
search for "http" and remove all the space after the periods till the next
"[".
Or the space could only be added when the period is not between
[link][/link] and
Could someone help me on this one, thanks,
André Couturier
www.tromal.net
[/bbcode] for format.
I have Aspell installed on the server, so people can make correction to
their text. Sometimes, they forget to add a space after a period. So Aspell
reads the last word of a sentence and the first word of the next sentence as
a single world, which gives an error, word not found.
Before sending the text to Aspell, i add a space after all the periods with:
string = string.replace(/./g, ". ");
I did this for the coma, and it's working, no problem.
But i dont want to add a space after periods in certain [bbcode] [/bbcode].
Because the links will not work.
[link]http://www.tromal.net/index3.php[/link]
I dont know how to do it, but after i added a space to all periods, i could
search for "http" and remove all the space after the periods till the next
"[".
Or the space could only be added when the period is not between
[link][/link] and
Could someone help me on this one, thanks,
André Couturier
www.tromal.net