fix: replace iframe with link in build_inspect_data#485
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
cppreference.com sets X-Frame-Options: DENY (MediaWiki default), which causes every browser to block the <iframe> used in build_inspect_data. Replace it with a plain <a> anchor that opens the documentation URL in a new tab, keeping the existing text/plain field intact. Adds a unit test asserting the output contains an <a href> and no <iframe>. Fixes compiler-research#484
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #485 +/- ##
==========================================
+ Coverage 73.99% 74.01% +0.02%
==========================================
Files 23 23
Lines 1196 1197 +1
Branches 111 111
==========================================
+ Hits 885 886 +1
Misses 311 311
🚀 New features to boost your workflow:
|
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<iframe>inbuild_inspect_data(src/xinspect.cpp) with a plain<a>anchor that opens the documentation URL in a new tab#pager-container/.xcpp-iframe-pagerCSS blocktest/test_interpreter.cppthat asserts the returnedtext/htmlcontains an<a href>and no<iframe>Why this matters
Closes #484. cppreference.com migrated to MediaWiki, which sets
X-Frame-Options: DENYby default as a deliberate security policy. This blocks the<iframe>pager in every browser (Chrome, Safari, JupyterLite), leaving the Shift+Tab inspect panel blank for all users. The maintainer confirmed that changing the cppreference server config is not feasible, so the fix must be on the xeus-cpp side. A clickable link is the simplest correct replacement - it requires no special permissions and works in all Jupyter environments.Fixes #484