[kupu-dev] why is kupu converting br to p ? FIX
Esko Virtanen
esko.virtanen at sll.fi
Tue Feb 17 11:40:05 CET 2009
Tue, 17 Feb 2009 09:05:44 +0100, Hans-Peter Locher wrote:
> 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.
Hi,
It doesn't matter if people understand or do not understarnd html - Kupu
is doing wrong thing here. If the p tags around the whole content are
compulsory then Kupu should warn or inform about that OR fix that instead
of changing the whole page to look totally different than what was
intended.
I get reports all over from people who say that this new version of Kupu
does not feel WYSIWYG anymore because it performs some mysterious changes
that seem to be out of their control.
Esko
>> 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