View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
09349Bug reportsData Entry (non public)public2016-02-15 17:34
Reporteriosononando Assigned Toc_schmitz  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Target Version2.06+Fixed in Version2.06+ 
Summary09349: Video tag gets corrupted by editor
Description

When you insert a video into a text-display question using HTML5 tags, the editor changes the code by:
1) closing void-elements (singleton tags) such as the <source> tag
2) converting self-standing video attributes into into name/value attributes

This generates invalid code (at least invalid in W3C terms) that some browsers can not interpret (especially browsers from the mobile world).

I'm using LS Version 2.05+ Build 141020

Steps To Reproduce

1) Create a text-display question
2) Switch to the "source" view of the editor
3) Copy the following standard video code (taken from W3schools.com):

<video width="320" height="240" controls autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

4) Switch back to normal view on the editor (i.e. exit source view)
5) Preview the question and inspect the code, or once again switch to "source" view
6) Notice that the code now looks terribly wrong:

<video controls="" height="240" width="320">
<source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </source></source></video>

See how <video controls> became <video controls=""> a name/value attribute that doesn't exist.
And see how those invalid </source> closing tags got inserted after the text... as if they were somehow nested? (not to mention the horrible layout).

I've tested this code on modern browsers in desktop and laptop and it anyway works. But if you try to test it on an iphone or table, then no video is shown.... which is not good at all.

Additional Information

I've checked this also on a local server and the problem persists...

TagsNo tags attached.
Attached Files
errors_in_video_tags.lss (12,566 bytes)
Bug heat2
Complete LimeSurvey version number (& build)Version 2.05+ Build 141020
I will donate to the project if issue is resolvedNo
Browserfirefox, chrome, IE 10
Database type & versionmysql 5.6.15
Server OS (if known)ubuntu
Webserver software & version (if known)apache 2.2.11
PHP Version5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-11-13 01:17

administrator   ~30963

This is an issue that cannot be easily solved.
However you can always use the HTML editor in popup mode so that it only comes active on request and so you can prevent the code for the related question from changing.
With 2.06 we will update to a newer CKEditor version.

Issue History

Date Modified Username Field Change
2014-11-04 10:55 iosononando New Issue
2014-11-04 10:55 iosononando File Added: errors_in_video_tags.lss
2014-11-13 01:17 c_schmitz Note Added: 30963
2014-11-13 01:17 c_schmitz Assigned To => c_schmitz
2014-11-13 01:17 c_schmitz Status new => acknowledged
2014-11-13 01:17 c_schmitz Target Version => 2.06+
2016-02-15 17:34 c_schmitz Status acknowledged => closed
2016-02-15 17:34 c_schmitz Resolution open => fixed
2016-02-15 17:34 c_schmitz Fixed in Version => 2.06+