Skip to content

Commit 2bd105f

Browse files
authored
Use "property" instead of "rel" where appropriate; fixes #188 (#191)
1 parent 1a27a7a commit 2bd105f

File tree

4 files changed

+89
-89
lines changed

4 files changed

+89
-89
lines changed

src/components/LicenseCode.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
<span v-if="!workTitle">{{ $t('license-use.richtext.workTitle') }}</span>
1818
<span
1919
v-else
20-
rel="dct:title"
20+
property="dct:title"
2121
>
2222
{{ workTitle }}
2323
</span>
2424
</a>
2525
<span
2626
v-else-if="workTitle"
27-
rel="dct:title"
27+
property="dct:title"
2828
>
2929
{{ workTitle }}
3030
</span>
@@ -100,7 +100,7 @@ export default {
100100
},
101101
creatorSpan() {
102102
if (this.creatorName) {
103-
return `<span rel="cc:attributionName">${this.creatorName}</span>`
103+
return `<span property="cc:attributionName">${this.creatorName}</span>`
104104
} else return ''
105105
},
106106
creatorName() {

src/utils/license-utilities.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function generateHTML(attributionDetails, shortLicenseName) {
154154
if (workUrl) {
155155
dataForHtmlGeneration.workTitle = `<a rel="cc:attributionURL" property="dct:title" href="${workUrl}">${workTitle}</a>`
156156
} else {
157-
dataForHtmlGeneration.workTitle = `<span rel="dct:title">${workTitle}</span>`
157+
dataForHtmlGeneration.workTitle = `<span property="dct:title">${workTitle}</span>`
158158
}
159159
}
160160
return dataForHtmlGeneration

tests/unit/specs/components/LicenseCode.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe('LicenseCode.vue', () => {
6666
})
6767
it('Check if the creatorSpan function returns the correct text', () => {
6868
state.attributionDetails.creatorName = 'J Doe'
69-
expect(wrapper.vm.creatorSpan).toBe('<span rel="cc:attributionName">J Doe</span>')
69+
expect(wrapper.vm.creatorSpan).toBe('<span property="cc:attributionName">J Doe</span>')
7070
})
7171
it('Check if the creatorName function returns the correct text', () => {
7272
state.attributionDetails.creatorName = 'J Doe'

0 commit comments

Comments
 (0)