mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Geomap: Sanitize the attribution string (#745)
* SAML: Update grafana/saml library (#691) Co-authored-by: jguer <joao.guerreiro@grafana.com> * SVG: Add dompurify preprocessor step (#698) * add sanitized SVG component * add sanitize * Fix frontend build * Remove unnecessary yarn.lock changes * Fix formatting * Re-add yarn.lock message as I guess it is needed --------- Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com> Co-authored-by: jguer <joao.guerreiro@grafana.com> Co-authored-by: nmarrs <nathanielmarrs@gmail.com> Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
This commit is contained in:
parent
cefeef7134
commit
6e950ca62a
2
go.mod
2
go.mod
@ -123,7 +123,7 @@ require (
|
|||||||
gopkg.in/mail.v2 v2.3.1
|
gopkg.in/mail.v2 v2.3.1
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
xorm.io/builder v0.3.6 // indirect
|
xorm.io/builder v0.3.6
|
||||||
xorm.io/core v0.7.3
|
xorm.io/core v0.7.3
|
||||||
xorm.io/xorm v0.8.2
|
xorm.io/xorm v0.8.2
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,7 @@ import { Map as OpenLayersMap } from 'ol';
|
|||||||
import { FeatureLike } from 'ol/Feature';
|
import { FeatureLike } from 'ol/Feature';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
import { getFrameMatchers, MapLayerHandler, MapLayerOptions, PanelData } from '@grafana/data/src';
|
import { getFrameMatchers, MapLayerHandler, MapLayerOptions, PanelData, textUtil } from '@grafana/data';
|
||||||
import { config } from '@grafana/runtime/src';
|
import { config } from '@grafana/runtime/src';
|
||||||
|
|
||||||
import { GeomapPanel } from '../GeomapPanel';
|
import { GeomapPanel } from '../GeomapPanel';
|
||||||
@ -114,6 +114,10 @@ export async function initLayer(
|
|||||||
return Promise.reject('unknown layer: ' + options.type);
|
return Promise.reject('unknown layer: ' + options.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.config?.attribution) {
|
||||||
|
options.config.attribution = textUtil.sanitizeTextPanelContent(options.config.attribution);
|
||||||
|
}
|
||||||
|
|
||||||
const handler = await item.create(map, options, panel.props.eventBus, config.theme2);
|
const handler = await item.create(map, options, panel.props.eventBus, config.theme2);
|
||||||
const layer = handler.init(); // eslint-disable-line
|
const layer = handler.init(); // eslint-disable-line
|
||||||
if (options.opacity != null) {
|
if (options.opacity != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user