Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EZP-21054: Anchor tag is not transformed by xsl #454

Closed
wants to merge 4 commits into from

Conversation

dpobel
Copy link
Contributor

@dpobel dpobel commented Jul 19, 2013

JIRA issue: https://jira.ez.no/browse/EZP-21054

Description

the anchor tag is not handled by our XSLT stylesheets. As a result, when a XmlText field contains an anchor element, it is rendered without any transformation, and of course this is not valid in HTML5.

While at it, I also added unit tests for the Html5 converter.

Tests

manual tests + unit tests

@bdunogier
Copy link
Member

Nice, +1.

@ezrobot
Copy link
Contributor

ezrobot commented Jul 19, 2013

This Pull Request does not respect our Coding Standards, please, see the report below:

FILE: ...rkspace/eZ/Publish/Core/FieldType/Tests/XmlText/Converter/Html5Test.php
--------------------------------------------------------------------------------
FOUND 4 ERROR(S) AFFECTING 4 LINE(S)
--------------------------------------------------------------------------------
  29 | ERROR | Whitespace found at end of line
  54 | ERROR | File must not contain multiple empty lines in a row; found 2
     |       | empty lines
 129 | ERROR | Multi-line function call not indented correctly; expected 12
     |       | spaces but found 8
 130 | ERROR | Closing parenthesis of array declaration must be on a new line
--------------------------------------------------------------------------------

@masev
Copy link
Contributor

masev commented Jul 19, 2013

Thanks, +1 !

@dpobel
Copy link
Contributor Author

dpobel commented Jul 19, 2013

(CS fixed, hopefully...)

*/
class Html5Test extends PHPUnit_Framework_TestCase
{

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CS: empty line

@lolautruche
Copy link
Contributor

+1, but maybe squash the commits :)

@andrerom
Copy link
Contributor

+1

@dpobel
Copy link
Contributor Author

dpobel commented Jul 21, 2013

https://travis-ci.org/ezsystems/ezpublish-kernel/jobs/9262577#L266
one of the unit tests is failing in PHP 5.3.3 because before 5.3.6 DomDocument::saveHTML() does not accept any parameter, I'll have to add a workaround for this.

@pspanja
Copy link
Contributor

pspanja commented Jul 21, 2013

@dpobel maybe a simple stylesheet would be a good solution there, something in the like of http://git.io/yG-LXQ.

Otherwise +1.

@dpobel
Copy link
Contributor Author

dpobel commented Jul 22, 2013

I tried to fix the unit test in PHP 5.3.3, I'm waiting for a green light from Travis to merge this one.

@dpobel
Copy link
Contributor Author

dpobel commented Jul 22, 2013

manually merged in 238d930, 36ef7a9, 91e5c67 and ba96ddc

@dpobel dpobel closed this Jul 22, 2013
@lolautruche lolautruche deleted the ezp-21054-anchor_ezxmltext branch July 22, 2013 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants