def test_pages_with_link_target():
    """Test that target=_blank links show in public interface"""
    ## TODO: Replace back to DEFAULT_THEME (aka core) in CTFd 4.0
    app = create_ctfd(ctf_theme="core-beta")
    with app.app_context():
        gen_page(
            app.db,
            title="Title",
            route="this-is-a-route",
            content="This is some HTML",
            link_target="_blank",
        )
        register_user(app)
        client = login_as_user(app)
        with client.session_transaction():
            r = client.get("/")
            html = r.get_data(as_text=True)
            print(html)
            assert "_blank" in html
    destroy_ctfd(app)
Test that target=_blank links show in public interface
tests/admin/test_pages.py