Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
server getfeatureinfo: restore quoting in plain/text format
  • Loading branch information
jef-n committed Feb 16, 2015
1 parent e338daf commit b3bd32f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/server/qgshttprequesthandler.cpp
Expand Up @@ -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" )
{
Expand Down
10 changes: 0 additions & 10 deletions src/server/qgswmsserver.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit b3bd32f

Please sign in to comment.