Changeset 340


Ignore:
Timestamp:
07/07/09 13:06:30 (5 years ago)
Author:
jon
Message:

Checking for htm extensions before adding them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • collective.imstransport/trunk/collective/imstransport/utilities/moodle/imsmoodlewriter.py

    r339 r340  
    114114 
    115115        if hasattr(obj.aq_explicit, 'Format'): 
     116            from urlparse import urlparse 
    116117            if 'text/html' == obj.Format(): 
    117                 path += '.html' 
     118                url = urlparse(path) 
     119                if url[2].split('.')[-1] not in ['htm', 'html']: 
     120                    path += '.html' 
    118121 
    119122        return path 
Note: See TracChangeset for help on using the changeset viewer.