Description

Text copied from another application causes the GUI to fail when you try to Preview or Save Changes. The sort of text I have tried:

  1. HTML table pasted from Firefox (file test3.html)

  2. Table pasted from OpenOffice Calc spreadsheet (files test3.ods test3.xls test3.html)

The error is apparently thrown by function process_inline in file MoinMoin/converter/text_html_text_x_moin.py. The full text of the error is shown at the bottom of this page (posted by a previous bug reporter) and also in process_inline_error.html. I have also received a different error while pasting from Firefox, which had to do with Don't support colgroup element.

The behaviour in copying from test3.html in Firefox is also different depending on whether I

  1. press CTRL-A to select all text in a window, and then copy it and paste it into MoinMoin's GUI. In this case, I get the exception above.

  2. drag my mouse over the table with the left button pressed, then copy it and paste it. In this case, MoinMoin produces a preview of a table which doesn't work, and upon pressing Preview again th page loads with error Illegal HTML attribute "height" passed to formatter.

Steps to reproduce

  1. Download one of the attachments called test3 on this page and view it in a WYSIWYG application (Firefox or OpenOffice).

  2. Open this page for editing using the GUI.
  3. Copy some of the table from the WYSIWYG application.
  4. Paste it into the MoinMoin GUI editor.

  5. Press the Preview button.

Example

Details

This wiki.

Workaround

Don't paste tables from GUI applications into Moin's GUI editor.

Discussion

It seems to me that this is an exception which is being handled in the wrong way. If MoinMoin doesn't recognise some HTML markup, it should probably gracefully ignore it rather than barfing all over an innocent user (and considering that they're trying to use the GUI, they probably are quite inexperienced users).

Just my opinion :-) .

Hi,

I tried the test3.odt on linux with OOo 2.0.4 and copied the table by selecting with the mouse and pasting by a middle click into the gui (1.6) and it could be saved without a failure. -- ReimarBauer 2008-01-18 09:04:40


Supplier /Contractor

Contact Telephone No

Department

Administration / Communication

Time taken to quote

Availability

Flexibility

On time delivery

Quality

Price



Overall performance

Comments

Drainage

OPC

Helpdesk

ICL













Helpdesk

CRL

3

3

2

2

3

2

4





OPC

Helpdesk

PS

3

3

3

2

3

3

5



3


Plan


CategoryMoinMoinBugFixed

This bug occurs whenever I copy and paste a HTML table into GUI editor. The message is like this:

 --> -->
ConvertError

process_inline: Don't support meta element

If you want to report a bug, please save this page and attach it to your bug report.

    * Show debugging information
    * Report bug
    * Visit MoinMoin wiki 

Traceback

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

   1.

      /usr/lib/python2.3/site-packages/MoinMoin/request.py in run (self=<MoinMoin.request.RequestFastCGI object>)
         1. 1137 from MoinMoin.wikiaction import getHandler
         2. 1138 handler = getHandler(self, action)
         3. 1139 handler(self.page.page_name, self)
         4. 1140
         5. 1141 # 5. Or redirect to another page 
          * handler = <function do_edit>
          * self = <MoinMoin.request.RequestFastCGI object>
          * self.page = <MoinMoin.Page.Page instance>
          * self.page.page_name = u'FreierMedientag2006/RaumPlan'
   2.

      /usr/lib/python2.3/site-packages/MoinMoin/wikiaction.py in do_edit (pagename=u'FreierMedientag2006/RaumPlan', request=<MoinMoin.request.RequestFastCGI object>)
         1. 572 if lasteditor == 'gui':
         2. 573 from MoinMoin.converter.text_html_text_x_moin import convert
         3. 574 savetext = convert(request, pagename, savetext) # XXX error handling
         4. 575
         5. 576 # IMPORTANT: normalize text from the form. This should be done in 
          * savetext = u'<p class="line903">vorl&auml;ufiger Raumplan:<br...rong><br /></strong></font></font></p><br /> </p>'
          * convert = <function convert>
          * request = <MoinMoin.request.RequestFastCGI object>
          * pagename = u'FreierMedientag2006/RaumPlan'
   3.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in convert (request=<MoinMoin.request.RequestFastCGI object>, pagename=u'FreierMedientag2006/RaumPlan', text=u'<page><p class="line903">vorl&auml;ufiger Raumpl...r /></strong></font></font></p><br /> </p></page>')
         1. 1192 text = u"<page>%s</page>" % text
         2. 1193 tree = parse(request, text)
         3. 1194 strip_whitespace().do(tree)
         4. 1195 return convert_tree(request, pagename).do(tree)
         5. 1196 
          * global convert_tree = <class 'MoinMoin.converter.text_html_text_x_moin.convert_tree'>
          * request = <MoinMoin.request.RequestFastCGI object>
          * pagename = u'FreierMedientag2006/RaumPlan'
          * ).do undefined
          * tree = <xml.dom.minidom.Document instance>
   4.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in do (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, tree=<xml.dom.minidom.Document instance>)
         1. 462 self.depth = 0
         2. 463 self.text = []
         3. 464 self.visit(tree.documentElement)
         4. 465 self.check_whitespace()
         5. 466 return ''.join(self.text) 
          * self = <MoinMoin.converter.text_html_text_x_moin.convert_tree object>
          * self.visit = <bound method convert_tree.visit of <MoinMoin.converter.text_html_text_x_moin.convert_tree object>>
          * tree = <xml.dom.minidom.Document instance>
          * tree.documentElement = <DOM Element: page>
   5.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in visit (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: page>)
         1. 409 nodeType = node.nodeType
         2. 410 if node.nodeType == Node.ELEMENT_NODE:
         3. 411 return self.visit_element(node)
         4. 412 elif node.nodeType == Node.ATTRIBUTE_NODE:
         5. 413 return self.visit_attribute(node) 
          * self = <MoinMoin.converter.text_html_text_x_moin.convert_tree object>
          * self.visit_element = <bound method convert_tree.visit_element of <Moi...erter.text_html_text_x_moin.convert_tree object>>
          * node = <DOM Element: page>
   6.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in visit_element (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: page>)
         1. 511 func = getattr(self, "process_%s" % name, None)
         2. 512 if func:
         3. 513 func(node)
         4. 514 else:
         5. 515 self.process_inline(node) 
          * func = <bound method convert_tree.process_page of <Moin...erter.text_html_text_x_moin.convert_tree object>>
          * node = <DOM Element: page>
   7.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in process_page (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: page>)
         1. 532 for i in node.childNodes:
         2. 533 if i.nodeType == Node.ELEMENT_NODE:
         3. 534 self.visit_element(i)
         4. 535 elif i.nodeType == Node.TEXT_NODE: # if this is missing, all std text under a headline is dropped!
         5. 536 txt = i.data.strip() # IMPORTANT: don't leave this unstripped or there will be wrong blanks 
          * self = <MoinMoin.converter.text_html_text_x_moin.convert_tree object>
          * self.visit_element = <bound method convert_tree.visit_element of <Moi...erter.text_html_text_x_moin.convert_tree object>>
          * i = <DOM Element: p>
   8.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in visit_element (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: p>)
         1. 511 func = getattr(self, "process_%s" % name, None)
         2. 512 if func:
         3. 513 func(node)
         4. 514 else:
         5. 515 self.process_inline(node) 
          * func = <bound method convert_tree.process_p of <MoinMoi...erter.text_html_text_x_moin.convert_tree object>>
          * node = <DOM Element: p>
   9.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in process_p (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: p>)
         1. 789
         2. 790 def process_p(self, node):
         3. 791 self.process_paragraph_item(node)
         4. 792 self.text.append("\n\n")
         5. 793 
          * self = <MoinMoin.converter.text_html_text_x_moin.convert_tree object>
          * self.process_paragraph_item = <bound method convert_tree.process_paragraph_ite...erter.text_html_text_x_moin.convert_tree object>>
          * node = <DOM Element: p>
  10.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in process_paragraph_item (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: p>)
         1. 795 for i in node.childNodes:
         2. 796 if i.nodeType == Node.ELEMENT_NODE:
         3. 797 self.process_inline(i)
         4. 798 elif i.nodeType == Node.TEXT_NODE:
         5. 799 self.text.append(i.data.strip('\n')) 
          * self = <MoinMoin.converter.text_html_text_x_moin.convert_tree object>
          * self.process_inline = <bound method convert_tree.process_inline of <Mo...erter.text_html_text_x_moin.convert_tree object>>
          * i = <DOM Element: meta>
  11.

      /usr/lib/python2.3/site-packages/MoinMoin/converter/text_html_text_x_moin.py in process_inline (self=<MoinMoin.converter.text_html_text_x_moin.convert_tree object>, node=<DOM Element: meta>)
         1. 748 command = "" # just throw away font settings
         2. 749 else:
         3. 750 raise ConvertError("process_inline: Don't support %s element" % name)
         4. 751
         5. 752 self.text.append(command) 
          * global ConvertError = <class MoinMoin.converter.text_html_text_x_moin.ConvertError>
          * name = u'meta'

ConvertError

process_inline: Don't support meta element

    * exceptions = <bound method ConvertError.exceptions of <MoinMo...ter.text_html_text_x_moin.ConvertError instance>>
    * innerException = (None, None, None)
    * message = u"process_inline: Don't support meta element"
    * name = 'MoinMoin Convert Error'

System Details

    * Date: Sun, 23 Apr 2006 12:59:45 +0000
    * Platform: Linux gnu 2.4.26 #2 Fri May 28 16:22:54 CEST 2004 i686
    * Python: Python 2.3.5 (/usr/bin/python)
    * MoinMoin: Release 1.5.3-rc2 (release)

MoinMoin: MoinMoinBugs/GuiEditorProcessInlineDontSupportMetaElement (last edited 2008-01-18 09:08:16 by ReimarBauer)