[mapserver-users] HTML template javascript and d3

Seth G sethg at geographika.co.uk
Wed Jul 18 15:29:55 PDT 2018


Hello,

Sounds an interesting use of MapServer!

Maybe try using [attribute item name_raw] in the template to avoid escaping. 
See details at http://mapserver.org/mapfile/template.html

Seth

--
web:http://geographika.co.uk
twitter: @geographika

On Wed, Jul 18, 2018, at 11:10 PM, Pierre-Étienne Lord wrote:
> Hi, I'm trying to render a html templte with d3.js.
> 
> Here what I try to reproduce but based on data from a html template 
> field item. http://bl.ocks.org/d3noob/13a36f70a4f060b97e41
> 
> My problem is that Mapserver seem to render my quote as #quot;
> 
> What I set into my html script section: data = [field_from_mapserver]
> 
> Here what I expect: data = [
> {date:"1-May-12",close:58.13},
> {date:"30-Apr-12",close:53.98},
> {date:"27-Apr-12",close:67.00} ];
> 
> What I get from my mapserver: data = [
> {date:"1-May-12",close:58.13},
> {date:"30-Apr-12",close:53.98},
> {date:"27-Apr-12",close:67.00} ];
> 
> I've tried to do a javascript replace the quote without success... (ex 
> [field_from_mapserver].replace(/#quot;/g,'');)
> 
> The expected data is stored in a geopackage in a text field.
> 
> Is it mapserver who is substituting my " by #quot; ?
> 
> Thanks! Pierre
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list