Bug: Double "&" in the url

Picture of Mohammad kabir
Bug: Double "&" in the url

I made a language option block. It works same as language menu.

I used  $PAGE->url   to get current page url and I found there is double "&" inside url.


<a href="https://nafo.localhost/mod/quiz/attempt.php?attempt=3632&amp;amp;page=2&amp;lang=en">English(En)</a>

<a href="https://nafo.localhost/mod/quiz/attempt.php?attempt=3632&amp;amp;page=2&amp;lang=no">NORSK-BOKMÅL(NO)</a>

There is double   "&amp;amp;" in the url.  str_replace("&amp;", "&" ... ) function could be a solution.  Is there any moodle function to get rid of it or ...?


Moodle: 2.8.3

Theme : Bootstrapbase: 2.3.0 

Thank you

Average of ratings: -