kendzi / kendzi3d

3D plugin for JOSM
57 stars 19 forks source link

Problems escaping characters #61

Open yopaseopor opened 7 years ago

yopaseopor commented 7 years ago

Hi! when I try to put some model letters I have to do some code like this:

<wayNodeModel matcher="-highway=motorway" filter='name="l'Albagés" "traffic_sign:forward"=* side=right' model="/models_ES/traffic_signs/name2Sign.obj" modelParameter="material.mat_sign.texture0=textures/content/black_l'Albagés.png" translate="vector(-0.01,2.1,1)" scale="height(1.5)" direction="270" offset="5" /> <wayNodeModel matcher="-highway=motorway" filter='name="l'Albagés" "traffic_sign:backward"=* side=left' model="/models_ES/traffic_signs/name2Sign.obj" modelParameter="material.mat_sign.texture0=textures/content/black_l'Albagés.png" translate="vector(0.01,2.1,-1)" scale="height(1.5)" direction="90" offset="-5" /> <wayNodeModel matcher="-highway=motorway" filter='name="l'Albagés" "traffic_sign:forward"=* side=left' model="/models_ES/traffic_signs/name2Sign.obj" modelParameter="material.mat_sign.texture0=textures/content/black_l'Albagés.png" translate="vector(-0.01,2.1,1)" scale="height(1.5)" direction="270" offset="-5" /> <wayNodeModel matcher="-highway=motorway" filter='name="l'Albagés" "traffic_sign:backward"=* side=right' model="/models_ES/traffic_signs/name2Sign.obj" modelParameter="material.mat_sign.texture0=textures/content/black_l'Albagés.png" translate="vector(0.01,2.1,-1)" scale="height(1.5)" direction="90" offset="-5" />

The problem is that in my language, that town is called as it is. I need the character " ' " inside the name so I have to escape it...but I don't know how to do it. I have tried ' but it does not work. Thanks

kendzi commented 7 years ago

You need to use standard xml escape sequence. You can escape " by using sequence " e.g. the filter may be encoded as:

 filter="name=&quot;l'Albagés&quot; &quot;traffic_sign:forward&quot;=* side=right" 

Unfortunately it doesn't look much readable. So I recommend you to use any xml editor which will encode values automatically.