Skip to content

Commit

Permalink
fix for crew echelon and svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Spinelli committed Jan 12, 2017
1 parent 8ed64ef commit 9e161cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion web/js/src/armyc2/c2sd/renderer/utilities/SVGTextInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,16 @@ armyc2.c2sd.renderer.utilities.SVGTextInfo = function (text, anchorPoint, fontIn
//catch special characters that break SVGs as base64 dataURIs
if(format === 1)
{
//got codes from: http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
//and https://unicodelookup.com (use HTML code)
text = text.replace(/\&/g,"&");
text = text.replace(/\</g,"&lt;");
text = text.replace(/\</g,"&gt;");
//text = text.replace(/\u2022/g,"&#x2022;");//echelon and ellipses dot
//text = text.replace(/\u25CF/g,"&#x2022;");//echelon and ellipses dot (black circle)
text = text.replace(/\u2022|\u25CF/g,"&#x2022;");//echelon and ellipses dot (black circle)
text = text.replace(/\u00B1/g,"&#x00B1;");//"RD" reinforce/reduced +- symbol
text = text.replace(/\u00D8/g,"&#216;");//Ø
text = text.replace(/\u00B1/g,"&#x00B1;");//"RD" reinforce/reduced ±
}
else if(format === 2)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ armyc2.c2sd.renderer.utilities.SymbolUtilities = {};
var text = null;
if(echelon === ("A"))
{
text = "0";
text = String.fromCharCode(216);//Ø
}
else if(echelon === ("B"))
{
Expand Down

0 comments on commit 9e161cd

Please sign in to comment.