mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ImageMap
synced 2024-11-23 22:03:31 +00:00
Allow negative coordinates in poly image maps
Previous attempts to clean this up followed similar logic to the circle and rect types of imagemaps. However, in reality, we have many image maps in our content that have negative values for poly coordinates. While this isn't logical, breaking them so loudly in the page isn't desirable. This change then removes the check for positive value and passes along the negative coordinate. Bug: T217087 Change-Id: I0ee84f059dacde79a7e4fb0a172ac6937360d864
This commit is contained in:
parent
223b87c5c4
commit
9f962fbad1
|
@ -207,7 +207,7 @@ class ImageMap {
|
|||
$coords = [];
|
||||
$coord = strtok( " \t" );
|
||||
while ( $coord !== false ) {
|
||||
if ( !is_numeric( $coord ) || $coord > 1e9 || $coord < 0 ) {
|
||||
if ( !is_numeric( $coord ) || $coord > 1e9 ) {
|
||||
return self::error( 'imagemap_invalid_coord', $lineNum );
|
||||
}
|
||||
$coords[] = $coord;
|
||||
|
|
Loading…
Reference in a new issue