}
}
- if ( $attribute === 'align' && !in_array( $element, $cells ) ) {
+ // Table align is special, it's about block alignment instead of
+ // content align (see also bug 40306)
+ if ( $attribute === 'align' && in_array( $element, $table ) ) {
if ( $value === 'center' ) {
$style .= ' margin-left: auto;';
$property = 'margin-right';
# Stupid hack
$encValue = preg_replace_callback(
- '/(' . wfUrlProtocols() . ')/',
+ '/((?i)' . wfUrlProtocols() . ')/',
array( 'Sanitizer', 'armorLinksCallback' ),
$encValue );
return $encValue;
* a. named char refs can only be < > & ", others are
* numericized (this way we're well-formed even without a DTD)
* b. any numeric char refs must be legal chars, not invalid or forbidden
- * c. use &#x, not &#X
+ * c. use lower cased "&#x", not "&#X"
* d. fix or reject non-valid attributes
*
* @param $text String
/**
* If the named entity is defined in the HTML 4.0/XHTML 1.0 DTD,
* return the UTF-8 encoding of that character. Otherwise, returns
- * pseudo-entity source (eg &foo;)
+ * pseudo-entity source (eg "&foo;")
*
* @param $name String
* @return String