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

moodle_url converts get params with '.' to an underscore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.0.3, 2.4.4, 2.5
    • Libraries
    • Windows 7, Internet Explorer and Google Chrome
    • MOODLE_20_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • 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));

      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.

            Unassigned Unassigned
            mfedorko Matt Fedorko
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.