-
Notifications
You must be signed in to change notification settings - Fork 17
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
IBX-5961: Fixed validation error due to not accepted TextAlign value #233
Conversation
<xsl:when test="$alignValue = 'left' or $alignValue = 'center' or $alignValue = 'right' or $alignValue = 'justify'"> | ||
<xsl:value-of select="$alignValue"/> | ||
</xsl:when> | ||
<xsl:otherwise>left</xsl:otherwise> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I here a default value of left
is used when the value provided is not supported.
This means that we silently changes whatever user provided. However, the validation errors provided by libxml is anyway not very informative so I think this is okay
@ezsystems/php-dev-team : please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide some test coverage showing that text-align: left
is indeed set by default.
Ahh.. two file are missing from the commit.. comming right up... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM concerning challenges coming from converting inconsistent Word-related formatting. Probably @alongosz might have some further remarks.
.../RichText/Converter/Xslt/_fixtures/xhtml5/edit/lossy/009-ezxhtmlTextalignInvalid.docbook.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still believe that input sanitization is a responsibility of an input provider, not handler, which is Online Editor in this case. We're opening ourselves here to wide range of bug fixes which might in the end pollute already complicated XSLT.
But given this solves the issue in a clean way (at least for XSL standards): +1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Approved on Ibexa Commerce 3.3.34-dev.
…not accepted TextAlign value
4eecd3c
to
a1f64e9
Compare
When cut&pasting from word, you might get TextAlign values that doesn't match our schema.
With this patch, TextAlign will default to"left" if the value specified is not acceptable
TODO:
$ composer fix-cs
).