mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #24090
[Bug 1421444] Re: Error trying to use an embed code with line breaks
To test:
1. Put an "External media" block in a Page
2. Enter an embed code into the block, and verify that it works. For
instance, this one from YouTube:
<iframe width="420" height="315"
src="https://www.youtube.com/embed/sVMhuiHm50I" frameborder="0"
allowfullscreen></iframe>
3. Save the block and verify that the embed code works.
4. Edit the external media block, and insert a line break into the embed
code. Like this:
<iframe width="420" height="315"
src="https://www.youtube.com/embed/sVMhuiHm50I" frameborder="0"
allowfullscreen></iframe>
Expected result: You should see the contents of the embed code as before
Actual result: The form fails validation, with the error message
"Invalid URL or embed code"
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1421444
Title:
Error trying to use an embed code with line breaks
Status in Mahara ePortfolio:
In Progress
Bug description:
I noticed this while testing out a Kaltura embed code that was
mentioned on the mahara.org forums:
https://mahara.org/interaction/forum/topic.php?id=6693&offset=0&limit=10#post28253
I noticed that the embed code provided by the user worked in Mahara
1.9 & 1.10, but not in 15.04dev. When I tried to enter this embed code
in 15.04dev, I received a form validation error: "Invalid URL or embed
code".
After running git bisect, I discovered that it was a problem in the
validation regex we added for Bug 1381807. Specifically, the regex
errors out when trying to validate an embed code that contains line
breaks. If I delete the line breaks and make the embed code all one
line, it works.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1421444/+subscriptions
References