mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
server getfeatureinfo: restore quoting in plain/text format
This commit is contained in:
parent
e338daf206
commit
b3bd32ff96
@ -368,8 +368,8 @@ void QgsHttpRequestHandler::setGetFeatureInfoResponse( const QDomDocument& infoD
|
|||||||
QDomElement attributeElement = attributeNodeList.at( k ).toElement();
|
QDomElement attributeElement = attributeNodeList.at( k ).toElement();
|
||||||
if ( infoFormat == "text/plain" )
|
if ( infoFormat == "text/plain" )
|
||||||
{
|
{
|
||||||
featureInfoString.append( attributeElement.attribute( "name" ) + " = " +
|
featureInfoString.append( attributeElement.attribute( "name" ) + " = '" +
|
||||||
attributeElement.attribute( "value" ) + "\n" );
|
attributeElement.attribute( "value" ) + "'\n" );
|
||||||
}
|
}
|
||||||
else if ( infoFormat == "text/html" )
|
else if ( infoFormat == "text/html" )
|
||||||
{
|
{
|
||||||
|
@ -2101,16 +2101,6 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = replaceValueMapAndRelation( layer, i, QgsExpression::replaceExpressionText( featureAttributes[i].toString(), &feature, layer ) );
|
value = replaceValueMapAndRelation( layer, i, QgsExpression::replaceExpressionText( featureAttributes[i].toString(), &feature, layer ) );
|
||||||
|
|
||||||
switch ( featureAttributes[i].type() )
|
|
||||||
{
|
|
||||||
case QVariant::Int:
|
|
||||||
case QVariant::LongLong:
|
|
||||||
case QVariant::Double:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
value = "'" + value + "'";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attributeElement.setAttribute( "value", value );
|
attributeElement.setAttribute( "value", value );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user