On Apr 26, 9:40 am, "Cecil Westerhof" <[EMAIL PROTECTED]> wrote:
> In a widget I use the following JavaScript:
> thisComment = result.comments[i].commentText.replace(/\n/g, "<br/>\n");
> appendChildNodes(commentDiv, P({'class' : 'commentText'}, thisComment));
>
> The problem is that the <br/> shows up as text on my page instead of
> generating a newline. What is happening here?
I changed the code to:
thisComment = result.comments[i].commentText.split("\n");
for(j = 0; j < thisComment.length; ++j) {
appendChildNodes(commentDiv, P({'class' : 'commentText'},
thisComment[j]));
}
That solves my problem nicely. ;-}
At the moment I do not want HTML-tags in commentText to work, but if I
wanted that: how would I do that?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---