Skip to content

Commit b3bd32f

Browse files
committedFeb 16, 2015
server getfeatureinfo: restore quoting in plain/text format
1 parent e338daf commit b3bd32f

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed
 

‎src/server/qgshttprequesthandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ void QgsHttpRequestHandler::setGetFeatureInfoResponse( const QDomDocument& infoD
368368
QDomElement attributeElement = attributeNodeList.at( k ).toElement();
369369
if ( infoFormat == "text/plain" )
370370
{
371-
featureInfoString.append( attributeElement.attribute( "name" ) + " = " +
372-
attributeElement.attribute( "value" ) + "\n" );
371+
featureInfoString.append( attributeElement.attribute( "name" ) + " = '" +
372+
attributeElement.attribute( "value" ) + "'\n" );
373373
}
374374
else if ( infoFormat == "text/html" )
375375
{

‎src/server/qgswmsserver.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,16 +2101,6 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
21012101
else
21022102
{
21032103
value = replaceValueMapAndRelation( layer, i, QgsExpression::replaceExpressionText( featureAttributes[i].toString(), &feature, layer ) );
2104-
2105-
switch ( featureAttributes[i].type() )
2106-
{
2107-
case QVariant::Int:
2108-
case QVariant::LongLong:
2109-
case QVariant::Double:
2110-
break;
2111-
default:
2112-
value = "'" + value + "'";
2113-
}
21142104
}
21152105

21162106
attributeElement.setAttribute( "value", value );

0 commit comments

Comments
 (0)
Please sign in to comment.