Bug desriptions only wrap on whitespace

Bug #6126 reported by Stuart Bishop
4
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Medium
Unassigned

Bug Description

When a particularly long string is needed in a bug description or comment
that is wider than the available space, we have no choice but to break the
the string and wrap it.

Launchpad, however, doesn't make this choice and instead allows the string
to pollute the neighbouring regions. This can be seen at
https://launchpad.net/products/launchpad/+bug/5417

 affects /products/malone

--
Stuart Bishop <email address hidden>
http://www.stuartbishop.net/

Attachment: signature.asc
Type: application/pgp-signature; name="signature.asc"
URL: http://librarian.launchpad.net/1475830/signature.asc

Tags: lp-bugs
Revision history for this message
James Henstridge (jamesh) wrote :

The fix for this would be in the fmt:text-to-html routine. There are a few choices here:

1. use the non-standard <wbr> tag (word break). This is supported by all major web browsers. Has the side effect that double click select won't select the entire word if it contains a word break.

2. use the zero width space character (&#8203;). Apparently causes some display issues in IE.

3. use the soft hyphen character (&shy; or &#173;). This character is supposed to only display when at the end of a line, and act as a word break. Unfortunately, it isn't properly supported by Mozilla (doesn't break words).
  http://www.w3.org/TR/REC-html40/struct/text.html#h-9.3.3
  https://bugzilla.mozilla.org/show_bug.cgi?id=9101

4. use actual space characters. Works with every browser, but looks ugly and can change the meaning of the text.

A rundown of the compatibility for the various word breaking methods can be found here:
  http://www.quirksmode.org/oddsandends/wbr.html

In both cases, we'd need to make some decisions about where to place such breaks. How long can a word get before we break it? Do we just break words at a particular number of characters, or try to inteligently hyphenate the text?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.