Skip to content

Commit

Permalink
Merge pull request #5291 from nextcloud-libraries/revert/reference_fu…
Browse files Browse the repository at this point in the history
…ll_url
  • Loading branch information
juliushaertl committed Feb 23, 2024
2 parents 70f3e19 + 86cce33 commit 03be0d2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/NcRichText/NcReferenceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ export default {
richObjectType: 'open-graph',
}
},
fullUrl() {
return new URL(this.text.trim(), window.location)
},
},
watch: {
text: 'fetch',
Expand All @@ -100,7 +97,7 @@ export default {
return
}
if (!(new RegExp(URL_PATTERN).exec(this.fullUrl.href))) {
if (!(new RegExp(URL_PATTERN).exec(this.text))) {
this.loading = false
return
}
Expand All @@ -116,7 +113,7 @@ export default {
})
},
resolve() {
const match = (new RegExp(URL_PATTERN).exec(this.fullUrl.href))
const match = (new RegExp(URL_PATTERN).exec(this.text.trim()))
if (this.limit === 1 && match) {
return axios.get(generateOcsUrl('references/resolve', 2) + `?reference=${encodeURIComponent(match[0])}`)
}
Expand Down

0 comments on commit 03be0d2

Please sign in to comment.