Skip to content

Commit

Permalink
Resolve vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyZhang777 committed Feb 3, 2024
1 parent 15a7135 commit 0f4ae6c
Show file tree
Hide file tree
Showing 13 changed files with 501 additions and 533 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/js/default-map-api-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getDefaultMapApiKey(mapProvider) {
case 'google':
return 'AIzaSyB5D45ghF1YMfqTLSzWubmlCN1euBVPhFw';
case 'mapbox':
return 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
return process.env.MAPBOX_KEY;
default:
throw new Error(
`Given mapProvider: '${mapProvider}' is invalid. Expects either 'google' or 'mapbox'.`
Expand Down
4 changes: 2 additions & 2 deletions static/js/theme-map/Maps/Providers/Baidu.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class BaiduPin extends ProviderPin {

// Load Function

const yextAPIKey = 'bxNEoKKmzVSORkUQGwRxLbtis4Wwokdg';
const yextAPIKey = process.env.BAIDU_KEY;
const baseUrl = 'https://api.map.baidu.com/getscript';

/**
Expand Down Expand Up @@ -350,7 +350,7 @@ function load(resolve, reject, apiKey, {
}

const negativeLngFixStyle = document.createElement('style');
negativeLngFixStyle.innerHTML = negativeLngFixCSS;
negativeLngFixStyle.innerText = negativeLngFixCSS;

document.head.appendChild(negativeLngFixStyle);
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/theme-map/Maps/Providers/Leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class LeafletPin extends ProviderPin {

// Load Function

const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
const yextAPIKey = process.env.MAPBOX_KEY;
const baseUrl = 'https://unpkg.com/leaflet@1.6.0/dist/leaflet';

/**
Expand Down
2 changes: 1 addition & 1 deletion static/js/theme-map/Maps/Providers/Mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class MapboxPin extends ProviderPin {

// Load Function

const yextAPIKey = 'pk.eyJ1IjoieWV4dCIsImEiOiJqNzVybUhnIn0.hTOO5A1yqfpN42-_z_GuLw';
const yextAPIKey = process.env.MAPBOX_KEY;

/**
* This function is called when calling {@link MapProvider#load} on {@link module:Maps/Providers/Mapbox.MapboxMaps}.
Expand Down
4 changes: 2 additions & 2 deletions static/js/theme-map/Util/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export class AccessibilityHelpers {
export const AccessibilityChecks = {
checkAltTags: function () {
const accessibilityStyleSheet = document.createElement('style');
accessibilityStyleSheet.innerHTML = `img:not([alt]) { outline: ${outlineStyle}; }`;
accessibilityStyleSheet.innerText = `img:not([alt]) { outline: ${outlineStyle}; }`;
for (let selector of whitelist) {
accessibilityStyleSheet.innerHTML += `${selector} img:not([alt]) { outline: none; }`;
accessibilityStyleSheet.innerText += `${selector} img:not([alt]) { outline: none; }`;
}
document.head.appendChild(accessibilityStyleSheet);
}
Expand Down
Loading

0 comments on commit 0f4ae6c

Please sign in to comment.