[kupu-dev] why is kupu converting br to p ? FIX
Hans-Peter Locher
locher.hanspeter at googlemail.com
Tue Feb 17 09:05:44 CET 2009
Hi Esko,
thank's for your research.
Am 16.02.2009 um 18:54 schrieb Esko Virtanen:
> I looked at the code and found kupucontentfilters.js line 708
>
> this._cleanupBr = function(ownerdoc, root)
>
> When there is no p tags around the whole page, this function
> replaces br
> tags with lines containing <p> </p>. In some cases these lines are
> doubled:
>
> some content
> <p> </p>
> <p> </p>
> more content
> <p> </p>
> <p> </p>
> etc
>
> The fix is to tell every web-manager to check that <p> tags exist in
> the
> beginning and end of the HTML before they exit HTML-mode in Kupu.
> This is
> not a good solution because most of the people do not understand html.
>
I think it's basically wrong that people use html mode who do not
understand html.
> Is it possible to fine-tune function cleanupBr to add missing p tags
> around the whole page instead of converting br tags everywhere?
>
>
> Example 1
> =========
>
> Paste following code to kupu in HTML-mode:
> <a href=http://www.plone.org/>Plone</a><br />
> <a href=http://www.zope.com/>Zope</a><br />
>
> That becomes:
> <a href="http://www.plone.org/">Plone</a>
> <p> </p>
> <a href="http://www.zope.com/">Zope</a>
> <p> </p>
>
> instead of
>
> <p>
> <a href=http://www.plone.org/>Plone</a><br />
> <a href=http://www.zope.com/>Zope</a><br />
> </p>
>
> or
>
> <p><a href=http://www.plone.org/>Plone</a></p>
> <p><a href=http://www.zope.com/>Zope</a></p>
>
>
> Example 2
> =========
>
> Paste following code to kupu in HTML-mode:
>
> <p>
> <a href=http://www.plone.org/>Plone</a><br />
> <a href=http://www.zope.com/>Zope</a><br />
> </p>
>
> That remains the same
>
>
> Esko
>
> _______________________________________________
> kupu-dev mailing list
> kupu-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/kupu-dev
best regards
mr_savage
More information about the kupu-dev
mailing list