Maven Doxia

[regression] attributes stripped from img tags

Details

  • Number of attachments :
    0

Description

previous versions didn't do this, but it is happening on trunk. For an example, run it on the Archiva site and compare outputs with the last release.

Issue Links

Activity

Hide
Lukas Theussl added a comment -

Which attributes are missing? In doxia-alpha-8 the xdoc parser emitted img tags as rawText, which preserves all attributes but is bad because it cannot be consumed by other sinks than xhtml (see DOXIA-183). Since doxia-alpha-9, img tags are properly handled as sink events but only the src, alt and title attributes are recognized.

Show
Lukas Theussl added a comment - Which attributes are missing? In doxia-alpha-8 the xdoc parser emitted img tags as rawText, which preserves all attributes but is bad because it cannot be consumed by other sinks than xhtml (see DOXIA-183). Since doxia-alpha-9, img tags are properly handled as sink events but only the src, alt and title attributes are recognized.
Hide
Lukas Theussl added a comment -

I guess at least width and height attributes should be conserved.

However, we should work on a more general solution that allows to pass arbitrary attributes to any sink methods. Something like (taking figure as example, this should be applied to all relevant sink methods)

public void figure( SinkEventAttributes attributes );

where SinkEventAttributes is just a Map of attribute names-values which should be parsed and processed by the receiving Sink. I'm not sure about the details yet but this would solve a couple of issues apart from the current one, eg DOXIA-38, DOXIA-63, DOXIA-78, DOXIA-163, DOXIA-164, DOXIA-204.

Comments, ideas?

Show
Lukas Theussl added a comment - I guess at least width and height attributes should be conserved. However, we should work on a more general solution that allows to pass arbitrary attributes to any sink methods. Something like (taking figure as example, this should be applied to all relevant sink methods)
public void figure( SinkEventAttributes attributes );
where SinkEventAttributes is just a Map of attribute names-values which should be parsed and processed by the receiving Sink. I'm not sure about the details yet but this would solve a couple of issues apart from the current one, eg DOXIA-38, DOXIA-63, DOXIA-78, DOXIA-163, DOXIA-164, DOXIA-204. Comments, ideas?
Hide
Lukas Theussl added a comment -

Fixed with DOXIA-204.

Show
Lukas Theussl added a comment - Fixed with DOXIA-204.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: