The macro seems to have problems including some websites, including www.google.com.

      Steps to reproduce the first scenario:

      • Add a new page
      • Insert Others Macros
      • Select Html Include
      • Insert the HTML Page's URL = www.atlassian.com for example
      • Click in insert

      In edit mode, this is display:

      In preview mode:

      If I insert the "http://" edit mode in macro or if I insert directly in the edit field using

      {html-include:url=http://www.atlassian.com} 
      
      

      the macro works but with some rendering errors.

      Steps to reproduce the second scenario:

      • Add a new page
      • Insert Others Macros
      • Select Html Include
      • Insert the HTML Page's URL = http://www.google.com for example
      • Click in insert

      The page doesn't work properly.

        1. html_include_error.jpg
          html_include_error.jpg
          6 kB
        2. html_include.jpg
          html_include.jpg
          5 kB

            [CONFSERVER-24472] html include doesn't work properly

            Anatoli added a comment -

            Hi,

            in confluence 4.1.3 when you forgot to specify protocol (http) it actually shows this error: "java.net.MalformedURLException: no protocol: www.simplewebsite.org/" which is not perfect but at least you can quickly figure out what went wrong.

            The rendering problems that you are seeing are due to the fact that we only include <body> part of the included page, css links are usually defined in <head> and because head is not included the rendering looks broken. We cannot include head part because it would create invalid html and will break confluence page.

            Anatoli added a comment - Hi, in confluence 4.1.3 when you forgot to specify protocol (http) it actually shows this error: "java.net.MalformedURLException: no protocol: www.simplewebsite.org/" which is not perfect but at least you can quickly figure out what went wrong. The rendering problems that you are seeing are due to the fact that we only include <body> part of the included page, css links are usually defined in <head> and because head is not included the rendering looks broken. We cannot include head part because it would create invalid html and will break confluence page.

              mseager Michael S
              Anonymous Anonymous
              Affected customers:
              1 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: