Skip to content

Commit d954d09

Browse files
authored
Merge pull request #4619 from nextcloud/fix/ui/escape-title-org
fix(ui): escape organization/title properties
2 parents e4a501d + 3644ed4 commit d954d09

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

package-lock.json

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"debounce": "^2.2.0",
6565
"downloadjs": "^1.4.7",
6666
"ical.js": "^2.2.1",
67+
"lodash": "^4.17.21",
6768
"mitt": "^3.0.1",
6869
"moment": "^2.30.1",
6970
"p-limit": "^6.2.0",

src/components/ContactDetails.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@
365365
</template>
366366

367367
<script>
368+
import escape from 'lodash/fp/escape.js'
368369
import { showError } from '@nextcloud/dialogs'
369370
370371
import ICAL from 'ical.js'
@@ -725,9 +726,9 @@ export default {
725726
organization,
726727
})
727728
} else if (title) {
728-
return title
729+
return escape(title)
729730
} else if (organization) {
730-
return organization
731+
return escape(organization)
731732
}
732733
733734
return ''

src/views/ReadOnlyContactDetails.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
</template>
4545

4646
<script>
47+
import escape from 'lodash/fp/escape.js'
4748
import { isMobile, NcEmptyContent, NcLoadingIcon } from '@nextcloud/vue'
4849
import IconContact from 'vue-material-design-icons/AccountMultiple.vue'
4950
import mitt from 'mitt'
@@ -112,9 +113,9 @@ export default {
112113
organization,
113114
})
114115
} else if (title) {
115-
return title
116+
return escape(title)
116117
} else if (organization) {
117-
return organization
118+
return escape(organization)
118119
}
119120
120121
return ''

0 commit comments

Comments
 (0)