@@ -100,8 +100,10 @@ class Info extends React.Component {
|
||||
<hgroup className="main">
|
||||
<h2 className="title">
|
||||
{title}
|
||||
{version && <VersionStamp version={version} />}
|
||||
<OpenAPIVersion oasVersion="2.0" />
|
||||
<span>
|
||||
{version && <VersionStamp version={version} />}
|
||||
<OpenAPIVersion oasVersion="2.0" />
|
||||
</span>
|
||||
</h2>
|
||||
{host || basePath ? (
|
||||
<InfoBasePath host={host} basePath={basePath} />
|
||||
|
||||
@@ -22,7 +22,7 @@ describe("<Info/> Sanitization", function(){
|
||||
|
||||
it("renders sanitized .title content", function(){
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user