Tags:
create new tag
view all tags

SID-02014: Comment plugin places visible <br /> in displayed comment

Status: Answered Answered TWiki version: 4.3.2 Perl version:
Category: CommentPlugin Server OS: AIX Last update: 11 years ago

So I am using TWiki version 4.3.2 I have placed the comment plugin in the page, but when a user hits the enter key for a line break in their comment it puts in a literal line break in the display. It places a <br /> in raw mode.

I am using the comment like this:

%COMMENT{type="tableprepend"}%

<br /> //This is what the comment actually inserts = <br />

The only way I can deal with this now is to edit out the line break later but this is not idea. Any idea how to handle it?

-- Greg Neugebauer - 2015-01-23

Discussion and Answer

The "tableprepend" type is meant for TWiki tables. TWiki tables cannot handle newlines in table cells, hence the br tag. Use another type. See docs at CommentPluginTemplate.

-- Peter Thoeny - 2015-01-24

Thanks, but when I tested this on the twiki.org example page it handled the break properly: http://twiki.org/cgi-bin/view/TWiki/CommentPluginExamples#tableprepend

It seems if the "tableprepend" is listed in the CommentPluginTemplate we would expected to work. Or are you doing something with URLPARAM on that page?

-- Greg Neugebauer - 2015-01-26

I tried this and it failed to take out the break: %COMMENT{ "%URLPARAM{ newline="$br" }%" type="tableprepend" }%

Also failing was: %COMMENT{ "%URLPARAM{ encode="off" }%" type="tableprepend" }% and %COMMENT{ "%URLPARAM{ encode="html" }%" type="tableprepend" }%

-- Greg Neugebauer - 2015-01-26

As I mentioned before, do not use type="tableprepend" if you do not want the br tags. There are other types, such as type="above" or type="below".

-- Peter Thoeny - 2015-01-27

My user wants what the type="tableprepend" does, and none of the other types work close enough. Specifically none of them "preappend"

-- Greg Neugebauer - 2015-01-27

You can create a new type that does what you want. Consult CommentPlugin for details, or hire one of the TWikiConsultants.

-- Peter Thoeny - 2015-01-27

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Comment plugin places visible <br /> in displayed comment
SupportCategory CommentPlugin
TWiki version 4.3.2
Server OS AIX
Web server Apache
Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2015-01-27 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.