Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-47159

atto_link should add 'http://' prefix when necessary

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Go to a course and add a label
      2. Enter this text:

        WE ADD HTTP://
        asdasd.com
         asdasd.com:3000
        asdfasd.com/asda/fjc.sdo
          asda.com
         www.asda.com
         
        LEAVE IT LIKE IT IS
        mod/quiz/asdasdas
        mod/quiz/../asdasdas
        protocol:asd
        #Region
        http://asd.com
        protocol:://mistake
        protocol://asd
        protocol:/asdasd
        ./path/to/file
          ../path/to/file
        /index.html
        ://noideawhattheytrytodo
          protocol://asd
         #Ident
         asd:dsd
        :thatsstrangesoidonttouchit
         :://iambjork
        

      3. Link each of the lines
      4. Look at the editor's contents source code
      5. The ones above LEAVE IT LIKE IT IS SHOULD be trimmed and prefixed with http://, the ones after LEAVE IT LIKE IT IS SHOULD remain linked as they are
      Show
      Go to a course and add a label Enter this text: WE ADD HTTP:// asdasd.com asdasd.com:3000 asdfasd.com/asda/fjc.sdo asda.com www.asda.com   LEAVE IT LIKE IT IS mod/quiz/asdasdas mod/quiz/../asdasdas protocol:asd #Region http://asd.com protocol:://mistake protocol://asd protocol:/asdasd ./path/to/file ../path/to/file /index.html ://noideawhattheytrytodo protocol://asd #Ident asd:dsd :thatsstrangesoidonttouchit :://iambjork Link each of the lines Look at the editor's contents source code The ones above LEAVE IT LIKE IT IS SHOULD be trimmed and prefixed with http:// , the ones after LEAVE IT LIKE IT IS SHOULD remain linked as they are
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-47159_master
    • Sprint:
      Team B Sprint 1, Team Beards Sprint 2
    • Issue size:
      Small

      Description

      If one creates a link using Atto's "link" button, and enters as value of the link 'www.google.com', then the created link goes to http://your.moodle/www.google.com . From a strict HTML point of view, this is logical, but our users find it confusing. As the old TinyMCE editor used to hint at this automatically, I think it would be a good idea to warn the user when it appears that an 'http://' could be missing.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15