Opened 14 years ago

Closed 14 years ago

#615 closed defect (wontfix)

table wrong

Reported by: eli_morais@… Owned by: akaEdge
Priority: normal Milestone:
Component: Documentation Version:
Severity: normal Keywords:
Cc:

Description

hi, i'm from brazil, and i don't speak well, but i'll try
I'm using cutenews (http://cutephp.com) and my table is showing like this:
<br><br><br><br><br>
<table etc... etc..

BUT into xinha is showing
<table, etc... etc... (without <br><br><br> before)

Note: really there isn't <br><br><br> but my table is show always in bottom when i use include (php) to show um article

What happens????????
charset?? (i don't think so)

Change History (5)

comment:1 Changed 14 years ago by mharrisonline

When your HTML is being displayed it is probably being run through something that converts \n characters to <br>, like PHP's nl2br, which does exactly what you describe.

You eeither need to turn the function off (which is intended to presevre formatting), or run the Xinha output through a filter to remove formatting as you save, like

myHTML = myHTML.replace(/\r\n/g," ");
myHTML = myHTML.replace(/\n/g," ");
myHTML = myHTML.replace(/\r/g," ");

comment:2 Changed 14 years ago by mharrisonline

In other words, to preserve the user's original formatting, cutenews must be taking the HTML submitted from the text area and is converting all the line breaks into <br> tags. Xinha outputs formatted HTML, which has linebreaks. With tables, what I have seen in the past is that all the line breaks in the tables' formatted HTML would be turned into <br> tags placed before the table.

comment:3 Changed 14 years ago by mharrisonline

Maybe there should be a config for Xinha that strips formatting from output.

comment:4 Changed 14 years ago by gogo

Maybe there should be a config for Xinha that strips formatting from output.

Hmm, job for a plugin I think.

comment:5 Changed 14 years ago by gogo

  • Resolution set to wontfix
  • Status changed from new to closed

As above, job for a plugin, if somebody really wants it they will write it. WONTFIX for the core

Note: See TracTickets for help on using tickets.