no effort is done in chm2pdf to delete javascript

Bug #890878 reported by Reto Knaak
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chm2pdf (Ubuntu)

Bug Description

My CHM file contained some javascript which caused ERR011 error messages by htmldoc.
No effort is done in chm2pdf to delete javascript (some other unwanted stuff is deleted before passing all to the htmldoc part).
I am no expert of regex, so the following may not be a good and complete solution, but at least in my case one ERR011 is gone!
    # Delete javascript (<script type='text/javascript'>...</script>)
    page=re.sub('(?i)<script type=("|\')text/javascript("|\')(.*?)>(.*?)</script>','', page, flags=re.DOTALL|re.MULTILINE)

Tags: patch
Steve Stalcup (vorian)
Changed in chm2pdf (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Reto Knaak (reto-knaak) wrote :

This is the first time I try to generate a patch... hope this is correct!

- added a regex to delete javascript: (?i)<script[^>]*>(.*?)</script>

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "delete javascript patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.