Migrate Mail Module (MAGNOLIA-4054)

[MAGNOLIA-4139] Sending pages by email fails due to parsing errors Created: 22/Mar/12  Updated: 02/Apr/12  Resolved: 30/Mar/12

Status: Closed
Project: Magnolia
Component/s: mail
Affects Version/s: None
Fix Version/s: 4.5.2

Type: Sub-task Priority: Neutral
Reporter: Milan Divilek Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File stacktrace-cmsedit.txt     Text File stacktrace-eacute.txt     Text File stacktrace-invaliduri.txt    
Issue Links:
relation
is related to MGNLSTK-933 Templates newsList.ftl and calendar.f... Closed
is related to MGNLSTK-935 STK imaging create link with blank sp... Closed
Template:
Date of First Response:

 Description   

When we want send html page by mail from TOOL-Mail-Html page configuration, it fails on parsing html code.

Parsing exception are depend to SAXBuilder. When we try transfrom html code to Document (xml).

  • code - <div class="rack-design" cms:edit> => org.jdom.input.JDOMParseException: Error on line 196: Attribute name "cms:edit" associated with an element type "div" must be followed by the ' = ' character.
  • When page contains some special symbol for example "é". This symbol is represented like a "é" and it's lead to org.jdom.input.JDOMParseException: Error on line 9: The entity "eacute" was referenced, but not declared.
  • When page contain special symbol "&". It lead to this error org.jdom.input.JDOMParseException: Error on line 186: The entity name must immediately follow the '&' in the entity reference.
  • Template /magnolia-module-standard-templating-kit/src/main/resources/templating-kit/components/teasers/newsList.ftl don't has closed <img> tag - it leads to org.jdom.input.JDOMParseException: Error on line 322: The element type "img" must be terminated by the matching end-tag "</img>".

Another exception is attached to images which in name contains blank space, it leads to invalid URI
java.lang.IllegalArgumentException: Invalid uri 'http://localhost:8080/magnoliaPublic/.imaging/stk/pop/content/dms/demo-project/img/bk/Opener/staircase-from-above/document/staircase from above.jpg': escaped absolute path not valid



 Comments   
Comment by Jan Haderka [ 29/Mar/12 ]

Would not it be safer to replace <div (.*) cms:edit> with <div (0)> rather then one specific div class?

Generated at Mon Feb 12 03:53:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.