Issue Details (XML | Word | Printable)

Key: MDL-17542
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Francois Marier
Reporter: Francois Marier
Votes: 0
Watchers: 2
Operations

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

html2text appears to be incompatible with the GPL

Created: 07/Dec/08 04:59 AM   Updated: 16/Jun/09 10:01 PM
Return to search
Component/s: Lib
Affects Version/s: 1.6.8, 1.7.6, 1.8.7, 1.9.3
Fix Version/s: 1.8.9, 1.9.5

File Attachments: 1. File html2text.new.php (20 kB)
2. File html2text.php (15 kB)
3. Text File html2text_replacement18.patch (28 kB)
4. Text File html2text_replacement19.patch (28 kB)
5. Text File html2text_replacement20.patch (28 kB)

Issue Links:
Dependency
 
Relates
 

URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507947
Participants: Anthony Borrow, Dongsheng Cai, Eloy Lafuente (stronk7), Francois Marier, Helen Foster, Martin Dougiamas and Petr Skoda
Security Level: None
QA Assignee: Helen Foster
Difficulty: Moderate
Resolved date: 22/May/09
Affected Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
This library was reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507947

The license for html2text is not included in the code, but rather on the website of the author:

  http://www.howtocreate.co.uk/jslibs/termsOfUse.html

The most problematic bit of html2text's license is the requirement to get written permission to distribute:

"However, if you want to include the scripts [...] in bundled or distributed scripts/software (such as Opera or Dashboard widgets, or the Formativ Academic Timetable), you should contact me first and obtain my express written permission."

Then, there is a bit of discrimination for commercial sites through the addition of an "advertising clause":

"Commercial/profit-making public websites:

You should put a note saying that the script was provided for free by http://www.howtocreate.co.uk.

You put a plain text (ie. not script) link to my site on your policy page or other appropriate page, to help me with my search engine rankings."

The Debian developer who filed the bug suggested that we take a look at replacing this library with the one I have attached here. It's got the same name but is under the GPLv2+.

Based on a quick 1.9 grep, that file is only used in lib/weblib.php:html_to_text(), which in turn is only used in format_text_email() of the same library file.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
fmarier committed 2 files to 'Moodle CVS' - 17/Dec/08 11:55 AM
MDL-17542 weblib/html2text: replace html2text.php with a GPL alternative (which is also faster)
MODIFY lib/html2text.php   Rev. 1.11    (+573 -145 lines)
MODIFY lib/weblib.php   Rev. 1.1187    (+6 -6 lines)
fmarier committed 2 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 03/Apr/09 07:00 AM
html2text: MDL-17542 switch to a GPL-compatible html2text library
MODIFY lib/weblib.php   Rev. 1.970.2.135    (+6 -6 lines)
MODIFY lib/html2text.php   Rev. 1.8.26.3    (+573 -145 lines)
fmarier committed 2 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 03/Apr/09 07:14 AM
html2text: MDL-17542 switch to a GPL-compatible html2text library
MODIFY lib/weblib.php   Rev. 1.812.2.110    (+9 -3 lines)
MODIFY lib/html2text.php   Rev. 1.8.20.1    (+573 -147 lines)
fmarier committed 3 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 22/May/09 10:07 AM
MDL-17542 lib/html2text: update to latest upstream version (r2374)

from http://trac.roundcube.net/log/trunk/roundcubemail/program/lib/html2text.php
MODIFY lib/weblib.php   Rev. 1.970.2.138    (+2 -5 lines)
MODIFY lib/html2text.php   Rev. 1.8.26.4    (+46 -47 lines)
MODIFY lib/html2text_readme.txt   Rev. 1.1.2.1    (+5 -0 lines)
fmarier committed 3 files to 'Moodle CVS' - 22/May/09 10:10 AM
MDL-17542 lib/html2text: update to latest upstream version (r2374)
from http://trac.roundcube.net/log/trunk/roundcubemail/program/lib/html2text.php
MODIFY lib/weblib.php   Rev. 1.1254    (+2 -5 lines)
MODIFY lib/html2text_readme.txt   Rev. 1.2    (+5 -0 lines)
MODIFY lib/html2text.php   Rev. 1.12    (+46 -47 lines)
fmarier committed 3 files to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 22/May/09 10:28 AM
MDL-17542 lib/html2text: update to latest upstream version (r2374)
from http://trac.roundcube.net/log/trunk/roundcubemail/program/lib/html2text.php
MODIFY lib/html2text_readme.txt   Rev. 1.2.2.2    (+5 -0 lines)
MODIFY lib/html2text.php   Rev. 1.8.20.2    (+46 -47 lines)
MODIFY lib/weblib.php   Rev. 1.812.2.111    (+2 -5 lines)