Skip to content
Permalink
Browse files

server getfeatureinfo: restore quoting in plain/text format

  • Loading branch information
jef-n committed Feb 16, 2015
1 parent e338daf commit b3bd32ff9601f7d12c81dadbf6913738ab5cdeab
Showing with 2 additions and 12 deletions.
  1. +2 −2 src/server/qgshttprequesthandler.cpp
  2. +0 −10 src/server/qgswmsserver.cpp
@@ -368,8 +368,8 @@ void QgsHttpRequestHandler::setGetFeatureInfoResponse( const QDomDocument& infoD
QDomElement attributeElement = attributeNodeList.at( k ).toElement();
if ( infoFormat == "text/plain" )
{
featureInfoString.append( attributeElement.attribute( "name" ) + " = " +
attributeElement.attribute( "value" ) + "\n" );
featureInfoString.append( attributeElement.attribute( "name" ) + " = '" +
attributeElement.attribute( "value" ) + "'\n" );
}
else if ( infoFormat == "text/html" )
{
@@ -2101,16 +2101,6 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
else
{
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 );

0 comments on commit b3bd32f

Please sign in to comment.
You can’t perform that action at this time.