Steps to replicate

      1. Install Confluence 5.8.16
      2. Create a new page and save the page
      3. Install Confluence Source editor
      4. Click edit on the new page and then find for '<>' to open the source editor
      5. Add the following code
        <ac:structured-macro ac:name="code"><ac:parameter ac:name="title">1st step source code</ac:parameter><ac:parameter ac:name="linenumbers">true</ac:parameter><ac:parameter ac:name="language">xml</ac:parameter><ac:parameter ac:name="collapse">true</ac:parameter><ac:plain-text-body><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
        <config charset="UTF-8">
          
          <!-- get the page -->
           <var-def name="profile_page_url">
             <script return="pPage">
                 <![CDATA[
                   pPage = org.apache.commons.httpclient.util.URIUtil.encodeQuery(profile_page.toString());
                 ]]]]><![CDATA[>
             </script>
           </var-def>
          
           <var-def name="profilePage">
              <html-to-xml>
            		<http url="${profile_page_url}"/>
              </html-to-xml>
           </var-def>
             
             <var-def name="company_name_link">
               <xpath expression="//*/div[1]/div[2]/div[2]/h3[1]/a[1]/@href">
                      <template>${profilePage}</template>
                  </xpath>
             </var-def>
             
           <export include-original-data="true" external-url="${profile_page_url}">  
            <single-column name="company_name_link" value="${company_name_link}" xpath="//*/div[1]/div[2]/div[2]/h3[1]/a[1]/@href"/>      
           </export>
        	
        </config>]]></ac:plain-text-body></ac:structured-macro>
        

      Observed behaviour
      The user won't be able to save the page. They will be seeing the following error:

      Expected Behaviour
      User should be able to save the page

        1. error.JPG
          17 kB
          Suren Raj

            [CONFSERVER-39968] Unable to save a page due to XML encoding

            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2898673 ] New: CONFSERVER Bug Workflow v4 [ 2992264 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2791172 ] New: JAC Bug Workflow v3 [ 2898673 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2721246 ] New: JAC Bug Workflow v2 [ 2791172 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2390945 ] New: JAC Bug Workflow [ 2721246 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 2271619 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2390945 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2221755 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 2271619 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2167256 ] New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2221755 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 [ 1922243 ] New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2167256 ]
            Katherine Yabut made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v3 [ 1725635 ] New: Confluence Workflow - Public Facing - Restricted v5 [ 1922243 ]
            Katherine Yabut made changes -
            Workflow Original: CONF Bug Subtask WF (TEMP) [ 1677988 ] New: Confluence Workflow - Public Facing - Restricted v3 [ 1725635 ]

              Unassigned Unassigned
              sraj Suren Raj
              Affected customers:
              4 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: