Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(security): strip html tags (#2479)
- Loading branch information
Showing
18 changed files
with
137 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,18 @@ import { mergeData } from 'vue-functional-data-merge' | |
import prefixPropName from '../../utils/prefix-prop-name' | ||
import copyProps from '../../utils/copyProps' | ||
import { assign } from '../../utils/object' | ||
import { htmlOrText } from '../../utils/html' | ||
import cardMixin from '../../mixins/card-mixin' | ||
|
||
export const props = assign({}, copyProps(cardMixin.props, prefixPropName.bind(null, 'footer')), { | ||
footer: { | ||
type: String, | ||
default: null | ||
}, | ||
footerHTML: { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
sirlancelot
|
||
type: String, | ||
default: null | ||
}, | ||
footerClass: { | ||
type: [String, Object, Array], | ||
default: null | ||
|
@@ -35,7 +40,7 @@ export default { | |
} | ||
] | ||
}), | ||
children || [h('div', { domProps: { innerHTML: props.footer } })] | ||
children || [h('div', { domProps: htmlOrText(props.footerHTML, props.footer) })] | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Props in Vue should not be in this format. Please change to
footerHtml
. Multiple props exist in this change that suffer from this issue. vuejs/vue#9505