• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

About The Author Box: Can Open Links in New WIndow

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › About The Author Box: Can Open Links in New WIndow

This topic is: not resolved

Tagged: about the author box

  • This topic has 7 replies, 2 voices, and was last updated 11 years, 8 months ago by Gary Jones.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • September 29, 2013 at 11:36 am #64682
    georgef
    Member

    Not sure if this is an issue with WordPress or my theme, but when I add target="_blank" in my description of my 'About the Author' box, the code seems to strip away.

    The a=href code still stays for my link and the link still works, but it doesn't open in a new window seeing as the code strips off.

    Anyone else have this issue or know how to fix?

    October 19, 2013 at 8:10 am #67646
    Gary Jones
    Member

    If it's a field added by Genesis, then yes, there is some attribute whitelisting going on (it's called KSES, and is an extension of what WP does). Fields native to WP may also be passed through wp_kses() to strip elements and attributes to for security reasons.

    Which exact field on which exact page are you entering the data?


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    October 19, 2013 at 8:38 am #67650
    georgef
    Member

    Its actually the biographical info in the profile area in the WordPress dashboard. So when you go to Users - Your Profile...

    October 19, 2013 at 9:03 am #67654
    Gary Jones
    Member

    Understood. Took a while to track down, but yes, I can see how it uses wp_kses(), and that means it's easily filterable, without opening up holes everywhere else.

    Try the following (untested), either in your child theme functions.php, or turn it into a single-purpose plugin:

    https://gist.github.com/GaryJones/7057100


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    October 19, 2013 at 9:25 am #67659
    georgef
    Member

    Thanks Garyl for your help here!

    I tried the code above, but now it seems to strip away all the code, including the code for the hyperlink and strong font. It previously only stripped away the target="_blank"

    October 20, 2013 at 7:42 am #67804
    Gary Jones
    Member

    I've updated the linked code - schoolboy error 🙂


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    October 27, 2013 at 12:07 am #69203
    georgef
    Member

    LoL thanks Gary. Apologies for the late reply here... hmmm still seems to strip away all the code with https://gist.github.com/GaryJones/7057100. I cleared cache and tried 3 times.

    Anything else I might be missing here?

    October 27, 2013 at 3:06 pm #69302
    Gary Jones
    Member

    If you disable that filter (add // before the add_filter line), does it return to the previous behaviour?

    There's no reason why that code should be making even more be stripped out.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble