[mapguide][MG92][Modified] Base layer group doesn't display if name contains a ")"

Walt Welton-Lair walt.welton-lair at autodesk.com
Fri Mar 10 21:53:09 EST 2006


You can view the artifact detail at the following URL:

    https://mapguide.osgeo.org/servlets/Scarab/id/MG92

Type:
Defect

Artifact ID:
MG92 (Base layer group doesn't display if name contains a ")")

Modified by:
Walt Welton-Lair
waltweltonlair (walt.welton-lair at autodesk.com)

The following modifications were made to this artifact:
---------------------------------------------------------------------

-- Submission Reviewed set to new value:
Yes
-- Resolution Description set to new value:
Old value:
A bit of background info: IE6 does not natively support PNG-32 transparency. The well documented workaround is to request the PNG in an IMG tag, and when the image is loaded to replace the IMG tag with a DIV tag, process the PNG image through an alpha filter, and set the content of the DIV with the resulting image.

Unbelievably the image URL passed to the alpha filter cannot contain parenthesis. It seems that the parsing of the parameter is so rudimentary that in the following code:
 filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='URL')

if URL contain a closing parenthesis it will be considered as the closing parenthesis of the call to AlphaImageLoader, truncating the URL.

There are 2 places in the AJAX viewer where we request images that needs processing using the AlphaImageLoader: when a tile is requested and when the overlay image is requested. In both cases we now encode the '(' and ')' characters in the URL when present.

Because the Javascript method encodeURIComponent() does not encode '(' and ')' characters, we provide a method encodeComponent() which calls the Javascript method first to encode the characters reserved for URI, then we encode '(' and ') characters in the resulting URI.

In addition to the bug described in this artifact, this fixes also the case where a map name contains ')' characters (map overlay did not show up)



New value:
A bit of background info: IE6 does not natively support PNG-32 transparency. The well documented workaround is to request the PNG in an IMG tag, and when the image is loaded to replace the IMG tag with a DIV tag, process the PNG image through an alpha filter, and set the content of the DIV with the resulting image.

Unbelievably the image URL passed to the alpha filter cannot contain parenthesis. It seems that the parsing of the parameter is so rudimentary that in the following code:

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='URL')

if URL contain a closing parenthesis it will be considered as the closing parenthesis of the call to AlphaImageLoader, truncating the URL.

There are 2 places in the AJAX viewer where we request images that needs processing using the AlphaImageLoader: when a tile is requested and when the overlay image is requested. In both cases we now encode the '(' and ')' characters in the URL when present.

Because the Javascript method encodeURIComponent() does not encode '(' and ')' characters, we provide a method encodeComponent() which calls the Javascript method first to encode the characters reserved for URI, then we encode '(' and ') characters in the resulting URI.

In addition to the bug described in this artifact, this fixes also the case where a map name contains ')' characters (map overlay did not show up).

-- Review Comments set to new value:
Fortunately an easy fix...




---------------------------------------------------------------------
This message was automatically generated by Project Tracker.








More information about the Mapguide_issues mailing list