Skip to content

Commit

Permalink
PocoDoc: fix iframe sandboxing
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Apr 17, 2022
1 parent 7e97da2 commit 9d1c428
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PocoDoc/resources/index.thtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ${PocoDoc.customHeadHTML}
</div>
<div class="body">
<div id="navigation">
<iframe sandbox src="navigation.html" onload="iFrameResize(this);" scrolling="no"></iframe>
<iframe sandbox="allow-scripts allow-top-navigation-by-user-activation allow-same-origin" src="navigation.html" onload="iFrameResize(this);" scrolling="no"></iframe>
</div>
<div id="content">
<h2>User Guides And Tutorials</h2>
Expand Down
2 changes: 1 addition & 1 deletion PocoDoc/src/DocWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ void DocWriter::writeNavigationFrame(std::ostream& ostr, const std::string& grou
query += item;
}
ostr << "<div id=\"navigation\">\n";
ostr << "<iframe sandbox src=\"navigation.html" << query << "\" onload=\"iFrameResize(this);\" scrolling=\"no\"></iframe>\n";
ostr << "<iframe sandbox=\"allow-scripts allow-top-navigation-by-user-activation allow-same-origin\" src=\"navigation.html" << query << "\" onload=\"iFrameResize(this);\" scrolling=\"no\"></iframe>\n";
ostr << "</div>\n";
}

Expand Down

0 comments on commit 9d1c428

Please sign in to comment.