Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-03-31 00:45:50

dbakkers
New member
Registered: 2005-03-23
Posts: 4

Make line breaks between </p><p> tags

I've read through the discussion on the arguments between using <P> and <BR> tags and the operation if IE vs Firefox, but not seen a possible answer.

What I want is to keep the <P> behaviour, but have a line break between the end of the </P> and the start of the next <P>. Without this, Xinha generates a single long string of text that my environment doesn't like.

So rather than genereate :
<P>Line 1</P><P>Line 2</P>

I want :
<P>Line 1</P>
<P>Line 2</P>

in the generated HTML

dbakkers@solidinterface.com.au

Offline

#2 2005-03-31 03:32:40

niko
Xinha Authority
From: Salzburg/Austria
Registered: 2005-02-14
Posts: 338

Re: Make line breaks between </p><p> tags

isn't both exaclty the same?
if you want nicely-formated html try using HtmlTidy.


Niko

Offline

#3 2005-03-31 19:21:56

dbakkers
New member
Registered: 2005-03-23
Posts: 4

Re: Make line breaks between </p><p> tags

Not quite the same. If a user is typing a very long message, Xinha turns it all into one long HTML 'sentence'. The mail server I use to underpin my application has limits on the length of a single sentence in the outgoing message.

My use of Xinha needs line breaks between the <p> paragraphs to break the text length into smaller pieces to stop the limit being reached. Also, the same would be good between the <br /> tags generated by Xinha.

I need to know where and how to insert those breaks. Would I need to insert an ASCII escape chacter or something else.

Offline

#4 2005-03-31 23:05:07

riftdesign
Xinha Pro
From: South Dakota, USA
Registered: 2005-03-22
Posts: 55
Website

Re: Make line breaks between </p><p> tags

One option is to run a post-submit string replacement in php or whatever you are using.

<?php
...
// give line break after <p> tags
$_POST['fieldname'] = str_replace('</p>', "</p>\n", $_POST['fieldname']);
...
?>

rift design studio
[url]http://www.riftdesign.com[/url]

Offline

Board footer

Powered by FluxBB