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

moodle_url converts get params with '.' to an underscore

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.3, 2.4.4, 2.5
    • Fix Version/s: BACKEND
    • Component/s: Libraries
    • Labels:
    • Environment:
      Windows 7, Internet Explorer and Google Chrome
    • Testing Instructions:
      Hide

      Add this unit test and make it pass:

      diff --git a/lib/tests/weblib_test.php b/lib/tests/weblib_test.php
      index 8ba4a4d..7d9254e 100644
      --- a/lib/tests/weblib_test.php
      +++ b/lib/tests/weblib_test.php
      @@ -292,6 +292,12 @@ class web_testcase extends advanced_testcase {
               $url4->out_as_local_url();
           }
       
      +    public function test_fullstop_in_url() {
      +        $originalurl = 'http://moodle.org/?a.dot=1';
      +        $url = new moodle_url($originalurl);
      +        $this->assertSame($url->out(false), $originalurl);
      +    }
      +
           public function test_clean_text() {
               $text = "lala <applet>xx</applet>";
               $this->assertEquals($text, clean_text($text, FORMAT_PLAIN));
      

      Show
      Add this unit test and make it pass: diff --git a/lib/tests/weblib_test.php b/lib/tests/weblib_test.php index 8ba4a4d..7d9254e 100644 --- a/lib/tests/weblib_test.php +++ b/lib/tests/weblib_test.php @@ -292,6 +292,12 @@ class web_testcase extends advanced_testcase { $url4->out_as_local_url(); }   + public function test_fullstop_in_url() { + $originalurl = 'http://moodle.org/?a.dot=1'; + $url = new moodle_url($originalurl); + $this->assertSame($url->out(false), $originalurl); + } + public function test_clean_text() { $text = "lala <applet>xx</applet>"; $this->assertEquals($text, clean_text($text, FORMAT_PLAIN));
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE

      Description

      When the following RSS feed:

      http://www.solarindustrymag.com/rss/rss.xml

      is added to the Remote RSS block, the links displayed have been modified from the correct link as follows:

      The link in the RSS feed, and the link for each story reads (for example) as:

      http://www.solarindustrymag.com/e107_plugins/content/content.php?content.8868

      But when it is linked in the RSS block, the link is:

      http://www.solarindustrymag.com/e107_plugins/content/content.php?content_8868=

      The last period has been changed to an underscore and an equal sign has been added. The link no longer directs the user to the correct story.

      Three points:

      1.) The RSS feed linked above works using other RSS aggregators (Google Reader, for instance).
      2.) The links and link descriptions are displaying properly (the article title is correct, it's just the link that is broken)
      3.) I tried a few other RSS feeds and they all seem to work fine (Washington Post, CNN, etc)

      In conclusion, I do not KNOW that this is a problem in Moodle, as opposed to a problem with the feed, but if you look at the feed itself the links are listed correctly.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated: