Skip to content

Commit 9cb893b

Browse files
author
markzegarelli
authored
Sanitize the settings description for each destination (#4098)
1 parent 5b6f842 commit 9cb893b

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

scripts/catalog_papi.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ const isCatalogItemHidden = (itemURL) => {
144144
}
145145
}
146146

147+
const sanitize = (text) => {
148+
const regex = /(<[^\/a].*?>)/ig;
149+
result = text.replace(regex, "`$1`")
150+
return result
151+
}
147152

148153
const updateSources = async () => {
149154
let sources = []
@@ -381,6 +386,12 @@ const updateDestinations = async () => {
381386
}
382387
return 0;
383388
})
389+
390+
settings.forEach(setting => {
391+
setting.description = sanitize(setting.description)
392+
});
393+
394+
384395
let actions = destination.actions
385396
let presets = destination.presets
386397

src/_data/catalog/destinations.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ items:
265265
defaultValue: false
266266
description: >-
267267
Send Segment Screen view events to A/B Smartly as goals. The goal name
268-
will be <screen_name>_screenview. The screen name is lower-cased and any
268+
will be `<screen_name>`_screenview. The screen name is lower-cased and any
269269
spaces or special characters are replaced with underscores. For example, a
270270
view of the "Home" screen will trigger the home_screenview goal. If the
271271
goal does not exist in the A/B Smartly web console, it is ignored.
@@ -282,7 +282,7 @@ items:
282282
defaultValue: false
283283
description: >-
284284
Send Segment Page view events to A/B Smartly as goals. The goal name will
285-
be <page_name>_pageview. The page name is lower-cased and any spaces or
285+
be `<page_name>`_pageview. The page name is lower-cased and any spaces or
286286
special characters are replaced with underscores. For example, a view of
287287
the "Home" page will trigger the home_pageview goal. If the goal does not
288288
exist in the A/B Smartly web console, it is ignored.
@@ -766,7 +766,7 @@ items:
766766
defaultValue: false
767767
description: >-
768768
If this setting is enabled, we will add `context.app.build`, if present,
769-
to Adobe's AppID, as `<name> <version> (<build>)`.
769+
to Adobe's AppID, as ``<name>` `<version>` (`<build>`)`.
770770
required: true
771771
label: Add application build to Adobe's App ID
772772
- name: collectHighEntropyUserAgentHints
@@ -9155,8 +9155,8 @@ items:
91559155
type: string
91569156
defaultValue: ''
91579157
description: >-
9158-
Allows Braze to add the nonce to any <script> and <style> elements created
9159-
by the SDK. [See more
9158+
Allows Braze to add the nonce to any `<script>` and `<style>` elements
9159+
created by the SDK. [See more
91609160
details](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#initializationoptions)
91619161
required: true
91629162
label: Content Security nonce
@@ -18617,7 +18617,7 @@ items:
1861718617
- name: oauth
1861818618
type: oauth
1861918619
defaultValue: {}
18620-
description: 'Authorize Segment to oauth <UPDATE> '
18620+
description: 'Authorize Segment to oauth `<UPDATE>` '
1862118621
required: false
1862218622
label: oauth
1862318623
- name: valueIdentifier
@@ -29015,8 +29015,8 @@ items:
2901529015
type: string
2901629016
defaultValue: ''
2901729017
description: >-
29018-
You can find your Hello Bar API Key, in the provided `<script>` tag for
29019-
example: `<script src="//my.hellobar.com/API_KEY.js">`
29018+
You can find your Hello Bar API Key, in the provided ``<script>`` tag for
29019+
example: ``<script src="//my.hellobar.com/API_KEY.js">``
2902029020
required: true
2902129021
label: API Key
2902229022
actions: []
@@ -30019,7 +30019,7 @@ items:
3001930019
defaultValue: true
3002030020
description: >-
3002130021
Format the event names for custom behavioral event automatically to
30022-
standard HubSpot format (`pe<HubID>_event_name`).
30022+
standard HubSpot format (`pe`<HubID>`_event_name`).
3002330023
required: true
3002430024
label: Format Custom Behavioral Event Names
3002530025
- name: loadFormsSDK
@@ -30463,8 +30463,8 @@ items:
3046330463
Enter your UBX account's base URL endpoint here. This can be found in the
3046430464
email you received from UBX after setting up your UBX account. It should
3046530465
have either the format
30466-
`https://<subdomain>.ubx.ibmmarketingcloud.com/<path>/` or
30467-
`https://<subdomain>.goacoustic.com/<path>/`.
30466+
`https://`<subdomain>`.ubx.ibmmarketingcloud.com/`<path>`/` or
30467+
`https://`<subdomain>`.goacoustic.com/`<path>`/`.
3046830468
required: true
3046930469
label: API URL
3047030470
- name: authToken
@@ -34723,8 +34723,8 @@ items:
3472334723
type: boolean
3472434724
defaultValue: true
3472534725
description: >-
34726-
Obfuscate all user-input elements (like <input> and <select>) from session
34727-
recordings.
34726+
Obfuscate all user-input elements (like `<input>` and `<select>`) from
34727+
session recordings.
3472834728
required: true
3472934729
label: Input Sanitization
3473034730
- name: networkSanitization
@@ -35530,7 +35530,7 @@ items:
3553035530
defaultValue: ''
3553135531
description: >-
3553235532
Your Marketo REST API Endpoint in this format:
35533-
`https://<your_account_id>.mktorest.com`
35533+
`https://`<your_account_id>`.mktorest.com`
3553435534
required: true
3553535535
label: Endpoint
3553635536
- name: folder
@@ -42552,8 +42552,8 @@ items:
4255242552
Enter your Quora Conversion Pixel write key. It should be a series of
4255342553
letters and numbers, which you can find in your `Install Pixel` option in
4255442554
your Quora Ads Manager -> Conversion Pixel tab. It is the string of
42555-
letters and numbers that is the second argument to `qp('init', <This is
42556-
your write key>)`
42555+
letters and numbers that is the second argument to `qp('init', `<This is
42556+
your write key>`)`
4255742557
required: true
4255842558
label: Quora Conversion Pixel Key
4255942559
actions: []
@@ -49010,8 +49010,8 @@ items:
4901049010
The inverse of ignoreUrls. Only report errors from whole urls matching a
4901149011
regex pattern or an exact string. whitelistUrls should match the url of
4901249012
your actual JavaScript files. It should match the url of your site if and
49013-
only if you are inlining code inside <script> tags. Not setting this value
49014-
is equivalent to a catch-all and will not filter out any values.
49013+
only if you are inlining code inside `<script>` tags. Not setting this
49014+
value is equivalent to a catch-all and will not filter out any values.
4901549015
required: false
4901649016
label: Whitelist Urls
4901749017
actions: []

0 commit comments

Comments
 (0)