Details

      Description

      This regression bug is caused by LPS-56644. The original intention of LPS-56644 was to fix the problem of whitespace characters surrounding links. This was fixed by using the .trim() method, but other logic was also added as a part of LPS-56644 that prepends http:// to links that do not already have it. This breaks internal linking for wikis. LPS-50520 was the first attempt to fix this issue, but it was overridden by the logic added in LPS-56644. This fix will add the logic from LPS-50520 back to fix internal links for wikis. The goal for this fix is to achieve the goals for both LPS-50520 and LPS-56644 without breaking internal wiki links.

      Steps to Reproduce:

      1. Add Wiki portlet to the page.
      2. 7.0 steps (below) if necessary
      3. Click This page is empty. Edit it to add some text.
      4. Test the following cases:
        1. Click Source and enter the following:
          [[test link|click the link]]
        2. Click Source and enter the following:
          [[www.liferay.com|Liferay]]
      5. Exit the Source edit
      6. Double click the newly created link, and observe the content in the dialog window.

      NOTE: For 7.0 you need extra steps to setup CKEditor

      1. Navigate to: Control Panel > Configuration > System Settings > Collaboration > Wiki Service
      2. Change settings to:
        • Get creole editor: ckeditor_creole
        • Get HTMLEditor: ckeditor
      3. Click Update/Save
      4. Navigate back to the Welcome page
      5. You may need to restart Portal because of: LPS-63201

      Expected Results:

      • The dialog window should not prepend 'http://' unless the link is an external link.
      • For existing links, dialog window should add http, only new links that "look" external (see additional sample data in comments)

      Actual Results: The dialog window prepends 'http://' for any link, breaking internal Wiki links.

        Attachments

        1. fail_62.png
          fail_62.png
          42 kB
        2. fix_master2.png
          fix_master2.png
          35 kB
        3. reproduce.png
          reproduce.png
          47 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 32 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 Beta 8