GeoUtils { public static String replaceUnsafeSvgText(String svg ) { if ( svg == null ) { return null; } svg = replaceText( svg ); svg = replaceInvalidPatterns( svg ); return svg; }  static double[] getBoxShape( double longitude, double latitude, double distance ); static double getDistanceBetweenTwoPoints( Point2D from, Point2D to); static Point getGeoJsonPoint( double longitude, double latitude ); static boolean checkGeoJsonPointValid( double longitude, double latitude ); static boolean checkPointWithMultiPolygon( double longitude, double latitude,
        Geometry geometry ); static String replaceUnsafeSvgText(String svg ); static Geometry getGeometryFromCoordinatesAndType( FeatureType featureType, String coordinates ); static String getCoordinatesFromGeometry( Geometry geometry ); static final int SRID; }
@Test public void testReplaceUnsafeSvgText() { String text = "<svg xmlns=\"http: "<text id=\"ext-sprite-1866\" zIndex=\"500\" text=\"Measles Coverage <1y\" font=\"bold 18px Arial,Sans-serif,Lucida Grande\" hidden=\"false\">" + "<text id=\"ext-sprite-1866\" zIndex=\"500\" text=\"BCG & DPT Coverage\" font=\"bold 18px Arial,Sans-serif,Lucida Grande\" hidden=\"false\">" + "</svg>"; String expected = "<svg xmlns=\"http: "<text id=\"ext-sprite-1866\" zIndex=\"500\" text=\"Measles Coverage 1y\" hidden=\"false\">" + "<text id=\"ext-sprite-1866\" zIndex=\"500\" text=\"BCG DPT Coverage\" hidden=\"false\">" + "</svg>"; String actual = replaceUnsafeSvgText( text ); Assert.assertEquals( expected, actual ); }