Re: Preformatted text and line wrapping



Markus Ernst <derernst@NO#SP#AMgmx.ch> scripsit:

it looks like I was not able to really explain the task.

It happens so often that the real problems emerge when everyone is rather tired of the discussion. That's the prime reason why one should _start_ from the original problem and not an assumed solution.

It is not about
public information, but just for a very specific group of
administrators of a specific web site.

Whether it's public or private isn't particularly relevant to the topic. But are you saying the page is not really a WWW page?

1. Website visitor submits a form.

2. System sends e-mail to administrator;

What's the idea? Letting ordinary users send messages to administrators via forms? OK, sending them by E-mail is one idea, though perhaps rather clumsy.

On the other hand, generally the best "feedback form" is to disclose the E-mail address(es) of administrators. If they cannot deal with the spam that may result, they should contact professionals on that. Besides, feedback forms generate spam, too.So before setting up some complex system, I think you should make sure the simple way is available and works.

Age: 50
Sex: M

I wonder whether the service complies with European legislation on protection of personal data. The legislation is rather strict about asking and processing data without a good, explainable reason. This note was just an excursion of course; I could not avoid seeing this info, and I cannot avoid seeing web pages that ask for (and even require) personal data with no good reason.

Now I would just like the submission text in this list to look similar
as the e-mail printed out from the mail client, and fit into the width
of the list displayed.

If you think that E-mail message texts need to be kept in their original format when inserting them into an HTML document (and that might be safest indeed), then why don't you keep them _exactly_ as they are, really preformatted?

Using the <pre> element here seems appropriate to me;

For displaying an E-mail message, yes (though you still need preprocessing for "&" and "<"), assuming that you don't want to study E-mail headers to see whether the body has been declared as reformattable.

and I don't
think that a CSS option of allowing line wrapping and long word
wrapping would actually break any concepts.

It would break the concept of keeping the E-mail body intact. If you let it wrap, you don't usually distort it, but the same applies to changing it to paragraphs (<p>) - where the risk of distortion might be a little bigger and the potential gain (in readability and pleasantness of appearance) even bigger.

All alternatives that
come to my mind are worse:
- use paragraph markup, replace presentational spaces by &nbsp;

You cannot know which spaces are presentational.

You could process the data by replacing _all_ spaces by no-break spaces (really no need to use the six-character entity reference instead of the one character here) and all line breaks by <br>. But this would be more or less the same as using <pre>.

- use preformatted markup, do line wrapping at the server side

Sounds like trying to eat the cake and keep it.

- display a .txt file in an iframe

Possible, with some benefits (no preprocessing needed), and sufficiently robust when you have a link to the file as the fallback content in the iframe element.

All 3 lower accessibility; the 1st and 2nd even introduce more
presentation into content than there already is, and are likely to
break in non-mainstream situations.

Accessibility of plain text such as E-mail message body is relatively good, but it becomes low when the message body contains constructs where spaces and line breaks should be regarded as significant. There's no simple solution to that.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

.



Relevant Pages

  • Re: Can you really 100% clean a compromised machine 100% of the time without wiping it?
    ... > what personal data they might have on it, ... stem the tide to some extent by offering generic cleaning advice or more ... specific cleaning advice when the exact nature of the problem is known. ... Yet another reason to advocate ...
    (microsoft.public.windowsxp.security_admin)
  • Re: SImple, easy, secure and cheap database solution for website?
    ... At last a note of reason instead of the usual knee-jerk personal data ... reasonable steps are taken then I can't see that a prosecution could ... law confers absolute rights on data subjects. ...
    (uk.net.web.authoring)
  • Re: Preformatted text and line wrapping
    ... That's the prime reason why one should _start_ from the original problem and not an assumed solution. ... I wonder whether the service complies with European legislation on protection of personal data. ... This note was just an excursion of course; I could not avoid seeing this info, and I cannot avoid seeing web pages that ask for personal data with no good reason. ...
    (comp.infosystems.www.authoring.html)
  • Re: company in administration
    ... The company's name has not changed so I see no reason so long as there is ... reasons not to disclose that fact on invoices and demands for payment. ... business they conduct will be guaranteed by the administrator that the ... invoice will be paid to do otherwise would leave the administrators open to ...
    (uk.legal)
  • Re: Folder permissions and take ownership
    ... Administrators group on a number of machines for various reasons ... I considered using FOlder permissions to lock out the local ... What is this unstoppable reason to make these users administrators? ...
    (microsoft.public.security)