Fixed Issue #1025 - URL-based glyphs and fonts break displaying of vector tiles (#1026)

Root cause: modified regex in #1002 caused URLs to be broken.
Fixed by reverting previous regexes.

Tests:
 * Confirmed by building and running locally with formerly breaking config.json and style json.
 * Run tests via Dockerfile_test
This commit is contained in:
Alek Kowalczyk 2023-10-20 20:02:45 +02:00 committed by GitHub
parent 471dd15e77
commit 4568027046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ import {
const FLOAT_PATTERN = '[+-]?(?:\\d+|\\d+.?\\d+)';
const PATH_PATTERN =
/^((fill|stroke|width)\:[^\|]+\|)*(enc:.+|-?\d+(\.\d*)?,-?\d+(\.\d*)?(\|-?\d+(\.\d*)?,-?\d+(\.\d*)?)+)/;
const httpTester = /^\/\//;
const httpTester = /^(http(s)?:)?\/\//;
const mercator = new SphericalMercator();
const getScale = (scale) => (scale || '@1x').slice(1, 2) | 0;

View file

@ -9,7 +9,7 @@ import { validate } from '@maplibre/maplibre-gl-style-spec';
import { getPublicUrl } from './utils.js';
const httpTester = /^\/\//;
const httpTester = /^(http(s)?:)?\/\//;
const fixUrl = (req, url, publicUrl, opt_nokey) => {
if (!url || typeof url !== 'string' || url.indexOf('local://') !== 0) {