[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Re: [edict-jmdict] Re: one more question about the new system/interface
On 08/03/2010 02:02 AM, Jean-Luc Léger wrote:
> Grumbl .. sent this mail to the list from the wrong address, again ^^;
> So here it is.
>
> -------- Original Message --------
> Subject: Re: [edict-jmdict] Re: one more question about the new
> system/interface
> Date: Tue, 03 Aug 2010 09:59:22 +0200
> From: Jean-Luc Léger <jean-luc.leger@*********>
> To: <edict-jmdict@yahoogroups.com>
>
> On Tue, 03 Aug 2010 00:25:32 -0600, Stuart McGraw <smcg4191@frii.com>
> wrote:
>> The format of the text you enter in the Comments of References boxes
>> (including line breaks) is preserved in the database. That formatting
>> is lost only when the text is displayed, because it is displayed as
>> ordinary html text which squishes strings of whitespace characters
>> (including newlines) into single space characters. I hope to fix this
>> so this to that line breaks are shown better. So by all means, please
>> continue to use line breaks to format your comments -- although it
>> seems to be ineffective now, someday they will start appearing as
>> you intended.
>
> you may try something like <pre>..</pre> when you display a comment. This
> should preserve newlines, blanks and so on.
The trouble with <pre> is that it doesn't wrap long lines and
many people, used to email and html that does wrap long lines,
never use line breaks. So a text line shown with <pre> often
requires scrolling a meter or so off the right side of one's
monitor to read it.
Perhaps I can translate "\n" in the text into "<br/>" but that
requires telling the presentation code not to escape special
characters like "<". But one can't allow things like "<script>"
in comments so I will need to escape the comment text first,
then translate the \n's to <br/>'s. This is not a big deal but
I need to find out how to reliably escape special characters
(are there other character forms like "#xx" that I need to worry
about?) I am sure this problem has come up before so most of
the "work" will be finding some code written by someone with
a clue that does this. As usual, it is an issue of relative
priorities.