@@ -100,8 +100,10 @@ class Info extends React.Component {
|
|||||||
<hgroup className="main">
|
<hgroup className="main">
|
||||||
<h2 className="title">
|
<h2 className="title">
|
||||||
{title}
|
{title}
|
||||||
{version && <VersionStamp version={version} />}
|
<span>
|
||||||
<OpenAPIVersion oasVersion="2.0" />
|
{version && <VersionStamp version={version} />}
|
||||||
|
<OpenAPIVersion oasVersion="2.0" />
|
||||||
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
{host || basePath ? (
|
{host || basePath ? (
|
||||||
<InfoBasePath host={host} basePath={basePath} />
|
<InfoBasePath host={host} basePath={basePath} />
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ describe("<Info/> Sanitization", function(){
|
|||||||
|
|
||||||
it("renders sanitized .title content", function(){
|
it("renders sanitized .title content", function(){
|
||||||
let wrapper = render(<Info {...props}/>)
|
let wrapper = render(<Info {...props}/>)
|
||||||
expect(wrapper.find(".title").html()).toEqual("Test Title **strong** <script>alert(1)</script>")
|
expect(wrapper.find(".title").html()).toEqual("Test Title **strong** <script>alert(1)</script><span></span>")
|
||||||
})
|
})
|
||||||
|
|
||||||
it("renders sanitized .description content", function() {
|
it("renders sanitized .description content", function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user