PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues Html with brace characters {} rendering invalid RTF

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26865

    pd4ml 3.8.5b8 embedded jar
    Windows 7 64 bit
    java 1.6.0_38

    When rendering an RTF from Html that has a brace character in it, you’re not escaping the brace characters. This results in an RTF file that has unmatched braces and cannot be opened by the most-often used editors for RTF viewing.

    From the RTF spec:

    As previously mentioned, the backslash () and braces ({ }) have special meaning in RTF. To use these characters as text, precede them with a backslash, as in \, {, and }.

    Html Example:
    <br /> <html><br /> <head/><br /> <body><br /> <div>{Belleville Toyota, Inc. v. Toyota Motor Sales, U.S.A., Inc.</div>,<br /> </body><br /> </html><br />

    Results in:
    <br /> {rtf1<br /> {info<br /> {title }<br /> }<br /> paperw11900paperh16840headery500footery500margl1104margr604margt604margb604widowctrlf1i0b0fs16{fonttbl{f1 Arial Unicode MS;}<br /> }<br /> {colortbl;red0green0blue0;<br /> }<br /> {widctlparcf1 {Belleville Toyota, Inc. v. Toyota Motor Sales, U.S.A., Inc.<br /> par}cf1f1i0b0fs20 , }<br />

    This is an invalid RTF file (cannot be opened by Microsoft Word).
    WordPad must be more lenient and add braces at the end, but regardless, the file violates the RTF spec.

    #29381

    We just fixed the issue in the development build. A fix will be available with the forthcoming beta release in about 1 week.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.