Permalink
Browse files

WFS 1.1/2.0: fix warning message when layer name is invalid to expand…

… '%s' to layer name
  • Loading branch information...
rouault committed Jan 19, 2014
1 parent a9dce78 commit 70350179589cc8a2102e5736d11ecb233e4fa02f
Showing with 8 additions and 3 deletions.
  1. +8 −3 mapwfs11.c
View
@@ -127,9 +127,14 @@ xmlNodePtr msWFSDumpLayer11(mapObj *map, layerObj *lp, xmlNsPtr psNsOws,
if (lp->name && strlen(lp->name) > 0 &&
(msIsXMLTagValid(lp->name) == MS_FALSE || isdigit(lp->name[0])))
- xmlAddSibling(psNode,
- xmlNewComment(BAD_CAST "WARNING: The layer name '%s' might contain spaces or "
- "invalid characters or may start with a number. This could lead to potential problems"));
+ {
+ char szTmp[512];
+ snprintf(szTmp, sizeof(szTmp),
+ "WARNING: The layer name '%s' might contain spaces or "
+ "invalid characters or may start with a number. This could lead to potential problems",
+ lp->name);
+ xmlAddSibling(psNode, xmlNewComment(BAD_CAST szTmp));
+ }
value = msOWSLookupMetadataWithLanguage(&(lp->metadata), "FO", "title", validate_language);
if (!value)

0 comments on commit 7035017

Please sign in to comment.