Issue 51443 - Broken table of contents hyperlink to heading with line break when saved as HTML
Summary: Broken table of contents hyperlink to heading with line break when saved as HTML
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.0 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-01 09:16 UTC by james_gnz
Modified: 2017-05-20 11:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description james_gnz 2005-07-01 09:16:31 UTC
If I create a heading with a line break (SHIFT+ENTER) in it,
create a table of contents with hyperlinks (Entries structure LS/E/LE),
and save as HTML Document,
then the HTML link & target anchors will have a line break in them.
This fails in Mozilla, and I'm fairly sure it's invalid HTML.


A bit like this:

<div>
  <b>Contents</b>
</div>

<p>
  <a href="#1.Bug report
by James G">Bug report<br />
  by James G</a>
</p>

<h1>
  <a name="1.Bug report
by James G"></a>Bug report<br />
  by James G
</h1>


My version of OpenOffice reports itself as 1.9.109


As an aside, would it be possible to restrict the anchor/fragment names to be
compatible with XHTML's ID type instead of just HTML's CDATA type?  I will be
saving documents as HTML, but it would be nice to be able to convert to XHTML
later without breaking links to anchors.

This page seems to have a suggestion for being compatible with both:
 <http://www.w3.org/TR/xhtml1/#guidelines>
In particular the section: C.8. Fragment Identifiers
Which suggests limiting names & ids to: [A-Za-z][A-Za-z0-9:_.-]*

Thanks.
Comment 1 michael.ruess 2005-07-01 09:29:53 UTC
Reassigned to ES.
Comment 2 eric.savary 2005-08-02 10:12:20 UTC
ES->TRA: this is a regression compared to OOo 1.1.4.

Before, the link contained the line break as char code (%0A), now it inserts a
plain text line break in the link.
Comment 3 tino.rachui 2005-09-06 08:39:13 UTC
TRA: Retargeted due to limited resources.
Comment 4 tino.rachui 2006-11-17 08:09:27 UTC
tra->mba: One for the writer team
Comment 5 Marcus 2017-05-20 11:24:47 UTC
Reset assigne to the default "issues@openoffice.apache.org".
Comment 6 Marcus 2017-05-20 11:26:03 UTC
Reset assigne to the default "issues@openoffice.apache.org".