mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Stop delimiters breaking MGRS conversion
This commit is contained in:
parent
8d1f668fc5
commit
8b77ad7748
1 changed files with 2 additions and 1 deletions
|
@ -117,7 +117,8 @@ class ConvertCoordinateFormat extends Operation {
|
||||||
// Prepare input data
|
// Prepare input data
|
||||||
if (inFormat === "Geohash" || inFormat === "Military Grid Reference System") {
|
if (inFormat === "Geohash" || inFormat === "Military Grid Reference System") {
|
||||||
// Geohash only has one value, so just use the input
|
// Geohash only has one value, so just use the input
|
||||||
inLat = input;
|
// Replace anything that isn't a valid character in Geohash / MGRS
|
||||||
|
inLat = input.replace(/[^A-Za-z0-9]/, "");
|
||||||
} else if (inDelim === "Direction Preceding") {
|
} else if (inDelim === "Direction Preceding") {
|
||||||
// Split on the compass directions
|
// Split on the compass directions
|
||||||
const splitInput = input.split(/[NnEeSsWw]/);
|
const splitInput = input.split(/[NnEeSsWw]/);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue