Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6953 closed defect (wontfix)

Html to odt strange (span inside paragraph)

Reported by: entend Owned by: Aurélien Bompard
Priority: normal Component: OdtExportPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

My plugin generate some code like:

{{{
#!html
<p>
<span style="display : none;">HTML Test</span>
</p>
}}}

As you see style of a span is set to not be displayed. But after export I see "HTML Test" in odt.

Btw, next examples works correct:

{{{
#!html
<span style="display : none;">HTML Test</span>
}}}

div:

{{{
#!html
<div style="display : none;">HTML Test</span>
}}}

div inside paragraph:

{{{
#!html
<p>
<div style="display : none;">HTML Test</span>
</p>
}}}

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by entend

Sorry,

Next examples works correct:

{{{
#!html
<span style="display : none;">HTML Test</span>
}}}

div:

{{{
#!html
<div style="display : none;">HTML Test</div>
}}}

div inside paragraph:

{{{
#!html
<p>
<div style="display : none;">HTML Test</div>
</p>
}}}

comment:2 Changed 7 years ago by Aurélien Bompard

Resolution: wontfix
Status: newclosed

Yes, I don't attempt to parse CSS (except on very special cases), whether inline or in a "style" tag.

The other examples work OK because they are not valid XHTML, and are therefore ignored, regardless of the value of the "style" attribute.

Parsing CSS in an XSL stylesheet is not something I want to attempt, because it's a completely different syntax.

comment:3 in reply to:  2 Changed 7 years ago by entend

Replying to abompard:

Yes, I don't attempt to parse CSS (except on very special cases), whether inline or in a "style" tag. Parsing CSS in an XSL stylesheet is not something I want to attempt, because it's a completely different syntax.

Thanks, I understood what was happening. I think it will be useful that your export plugin ignore elements by special word (marker). For example:

{{{
#!html
<p>
<span odtexportignore>HTML Test</span>
</p>
}}}

In a future it could be useful for including or not part of wiki-page for export

comment:4 Changed 7 years ago by Aurélien Bompard

That's an interesting idea, although I'm not sure about the implementation yet. Could you submit it as an enhancement proposal please ?

Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Aurélien Bompard.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.