mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
* fix(database): improve escaping of URLs and user input Escape user-provided select option values and colors when building the database API documentation, and restrict URL, link and button field cell hrefs to a safe scheme allowlist so non-navigable values are normalised. Add unit tests for the URL scheme helpers and the select option docs output. * fix(database): keep url hrefs working for string and protocol-relative values Restore hrefs for URL lookup/array cells whose value is a plain string, and prefix protocol-relative `//` URLs with `https:` instead of `https://`. Add changelog entry. * fix: address feedback
41 lines
870 B
Vue
41 lines
870 B
Vue
<template>
|
|
<div class="array-field__item">
|
|
<div class="array-field__ellipsis">
|
|
<a
|
|
v-if="selected && isValid(value)"
|
|
:href="getHref(value)"
|
|
target="_blank"
|
|
rel="nofollow noopener noreferrer"
|
|
class="forced-pointer-events-auto"
|
|
@mousedown.stop
|
|
>
|
|
{{ getLabelOrURL(value) }}
|
|
</a>
|
|
<u v-else-if="isValid(value)">
|
|
{{ getLabelOrURL(value) }}
|
|
</u>
|
|
<template v-else>
|
|
{{ getLabelOrURL(value) }}
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import linkURLField from '@baserow/modules/database/mixins/linkURLField'
|
|
export default {
|
|
name: 'FunctionalFormulaLinkArrayItem',
|
|
mixins: [linkURLField],
|
|
props: {
|
|
value: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
selected: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
},
|
|
}
|
|
</script>
|