Defect #843

BR tags no longer working in textile

Added by Rocco Stanzione over 9 years ago. Updated over 7 years ago.

Status:ClosedStart date:2008-03-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Wiki
Target version:-
Resolution:Wont fix Affected version:

Description

I have lots of <br> or <br /> tags in my wiki pages, which are now rendered as text. From the docs I don't see another way to force a break. I wasn't paying very close attention but I assume this was changed in r1216. Could we add this to the list of respected HTML tags? Better yet, could we make that list configurable?

Associated revisions

Revision 1259
Added by Jean-Philippe Lang over 9 years ago

Add a margin to the bottom of wiki tables (#843).

History

#1 Updated by Jean-Philippe Lang over 9 years ago

Actually, there's no need for br tags. You can just use the carriage return.

This:

line 1
line 2

Displays:

line 1
line 2

Do you have an example where a br tag is needed ?

#2 Updated by Rocco Stanzione over 9 years ago

Yeah carriage returns will do line breaks, but like other whitespace consecutive ones aren't respected. Where I'm using the br tags is mostly after wiki tables, where there's an unattractive lack of whitespace between the table and the, say, h2 that comes after it. So, I really only need it for vertical whitespace, not just line breaks. I'll do an example here...

this is a table
with just two rows

And this is a header

There are three carriage returns between the table and the header, and I don't seem to have a way to add actual whitespace between them.

#3 Updated by Mateo Murphy over 9 years ago

Your issue might be better handled by modifying the wiki's css styles to add margins to the bottom of tables and/or the top of the headers. Are you finding you need extra whitespace after something other than a table?

#4 Updated by Rocco Stanzione over 9 years ago

r1259 made me happy - if no one else wants br tags, this issue is safe to close.

#5 Updated by Jean-Philippe Lang over 9 years ago

  • Status changed from New to Closed
  • Target version set to 0.7
  • Resolution set to Fixed

Fine. Reopen if needed.

#6 Updated by Morbus Iff over 9 years ago

  • Status changed from Closed to Reopened

Reopening. This killed my wiki.

I have complex HTML needs for a wiki (such as a global Navigation box that appears in the header of every page, and includes <div> formatting) and also go back and forth between a local HTML document and the wiki. I need the ability to include raw HTML in the wiki and have it work as expected. I've now got a 100 page (private) wiki which is horrifically broken due to the escaping :(

Perhaps we could get some sort of <raw> or <html> tag? Textile is not everyone's savior.

#7 Updated by Morbus Iff over 9 years ago

+1 to allowing ALLOWED_TAGS be editable in the admin, per project.

#8 Updated by Eric Davis over 9 years ago

+1 to allowing ALLOWED_TAGS be editable in the admin. I use blockquote all the time to reference quotes and it's hard to use the Textile bq. on every paragraph. Should have the same rules for issue descriptions.

#9 Updated by Jean-Philippe Lang over 9 years ago

  • Target version deleted (0.7)

#10 Updated by Jack Christensen almost 9 years ago

+1 to editing ALLOWED_TAGS. I need to have line breaks in tables and now I have to monkey patch to allow br's.

#11 Updated by Arndt Lehmann almost 9 years ago

+1: I am also looking for a way to have line breaks within table cells.

#12 Updated by Eric Voisard over 8 years ago

+1: I see many reasons why consecutive line breaks should be respected: readability, page layout, respect to copy&paste structure of text files such as logs, traces, etc... well, all pertain to readability in fact...

Maybe convenience as well: we should expect people updating wikis not all being web developers but MS Word and the like users: with the tools they are used to, when they press <return> several times, it puts space between their lines of text. It's basic and it's the most straightforward way to adjust page layout.
When they (well me too!) do the same in Redmine's wiki editor, I think they expect the same behavior, especially since they can enter blank lines in the editor...

Besides this, thanks to Redmine's Team for the very nice software
Eric

#13 Updated by Richard Pecl over 8 years ago

+1: for advanced wiki formatting <div> is essential

#14 Updated by Emrah KAVUN over 8 years ago

Any update regarding this issue?
I am using Redmine 0.8.4.stable.2819 and my html tags are not interpreted. E.g.: <br /> doesn't put a line break. (seems to be the case here too)

Any possible changes I could make in redcloth3 configs?

#15 Updated by Jack Christensen over 8 years ago

Put the following in an initializer:

RedCloth3::ALLOWED_TAGS << "br" 

#16 Updated by Emrah KAVUN over 8 years ago

Thanks a lot, it worked perfectly fine.

#17 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from Reopened to Closed
  • Resolution changed from Fixed to Wont fix

+1: I see many reasons why consecutive line breaks should be respected: readability, page layout, respect to copy&paste structure of text files such as logs, traces, etc

Using pre tags is great for logs or stack traces.

Also available in: Atom PDF