Issue Details (XML | Word | Printable)

Key: MDL-3043
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Mathieu Petit-Clair
Reporter: Gustav W Delius
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

HTML editor swallows some spaces

Created: 27/Apr/05 03:21 AM   Updated: 06/May/09 07:58 AM
Return to search
Component/s: HTML Editor
Affects Version/s: 1.5, 1.9.1
Fix Version/s: None

Environment: All
Issue Links:
Duplicate
 

Participants: Dan Marsden, Gustav W Delius, Leang Chumsoben, Martin Dougiamas and Mathieu Petit-Clair
Security Level: None
Affected Branches: MOODLE_15_STABLE, MOODLE_19_STABLE


 Description  « Hide
When I cut and paste into the HTML editor and then save, some of the spaces have disappeared. This seems to be completely random, only about 10% of the spaces disappear. This is in Firefox on windows XP.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 28/Apr/05 07:31 PM
From Hiroto Kagotani (kagotani at cne.okayama-u.ac.jp) Wednesday, 27 April 2005, 07:46 PM:

htmlarea.php 1.46 in CVS does not have the problem but 1.47 has. A new function formathtml() introduced in 1.47 removes all newline codes in html, so you can reproduce the problem by:

Toggle to HTML source mode and enter

a b

c d

and toggle to wysiwyg mode, then again toggle to HTML source mode.

I think formathtml() should remove newline codes only at the beginning and the end of the html source. Replacing newline codes to spaces may cause another problem for other languages such as Japanese. A single newline code in Japanese text is just simply ignored but a space code is took into account.

From Gustav Delius (gwd2 at york.ac.uk) Thursday, 28 April 2005, 07:15 PM:

It seems to me that Janne has now fixed this. Thank you both for your work on this. Should the bug be closed?

From Janne Mikkonen (janne.mikkonen at julmajanne.com) Thursday, 28 April 2005, 07:31 PM:

Lets not close this one until it's really gone...


Dan Marsden added a comment - 26/Aug/06 08:21 AM
can this be closed now?

Dan


Mathieu Petit-Clair added a comment - 01/Jul/08 03:04 PM
This is still an issue, but will be complicated to solve. Reading the specifications on http://www.w3.org/TR/html401/struct/text.html#whitespace .. it seems the editor is behaving the right way for european languages, but arguably not the right way for asiatic languages. The text says: "when formatting text, user agents should identify these words and lay them out according to the conventions of the particular written language (script) and target medium." ... but even in the most recent TinyMCE, I can't find a trace that this is the expected behavior.

For Moodle 2.0, I think this should be fowarded upstream, to the TinyMCE team, though they already have plenty of white space related bugs: http://sourceforge.net/search/?words=white+space&sort=open_date&sortdir=desc&offset=0&group_id=103281&type_of_search=artifact&pmode=0


Leang Chumsoben added a comment - 06/Aug/08 05:54 PM
I'm sorry everyone for cross-posting. But did this issue relate to my issue (http://tracker.moodle.org/browse/MDL-12190)? The issue still exists in Moodle 1.9.2.

The issue is that: I can type Zero-Width Space in HTML Editor without any problem but when I switch to HTML mode (or click Save Changes), all the ZWSP have changed to Space. We can't accept this writing (space between all words) in our Khmer language, so our temporary solution for now is using TinyMCE. But it's not the proper solution. Is it?


Mathieu Petit-Clair added a comment - 07/Aug/08 09:12 AM
Well, actually ... As HTMLArea is not supported/developed anymore, this might be the proper solution. The next version of Moodle will come with TinyMCE, so if this editor works for you, all the better.

Leang Chumsoben added a comment - 08/Aug/08 04:40 PM - edited
Thank you Mathieu for the information. It's really great to have TinyMCE as the editor for the next Moodle.

And do you mean the next version of Moodle is 2.0?