7 Replies Latest reply on Feb 4, 2015 1:25 PM by Chris Irvine

    The DDR doesn't encode ampersands in style names

    nickorr

      Summary

      The DDR doesn't encode ampersands in style names

      Product

      FileMaker Pro

      Version

      13.0v3

      Operating system version

      Mac OS 10.9.3

      Description of the issue

      When you have a layout object with a custom style name that contains an ampersand character, when you generate the DDR the ampersand won't be properly encoded and this will mean you have invalid XML that can't be used in other applications.

      Steps to reproduce the problem

      Create a new file with a layout object of any sort.  Select the object in layout mode, and go to the styles tab of the inspector and choose "Save As New Style...".  Give the style a name with an & character in it.  Save the style and the layout and then generate the DDR.

      Expected result

      All & characters should be encoded as & in text nodes of XML.

      Actual result

      They aren't encoded and it fails to be able to be read because of validation issues in the XML.

      Exact text of any error message(s) that appear

      From xmllint :

      error: EntityRef: expecting ';'

      ~module&nav_name_light


                                  ^

      Configuration information

      I haven't checked if other characters cause this issue, or if there are other places where this also occurs.  The exact specs are :

             * Text Nodes- the string value, except all ampersands are
               replaced by &, all open angle brackets (<) are replaced by
               <, all closing angle brackets (>) are replaced by >, and
               all #xD characters are replaced by &#xD;.

      http://www.ietf.org/rfc/rfc3076.txt

      Workaround

      None available, as you can't do a search and replace on any unencoded characters without picking up ones that may be already encoded, so it's a fatal error.