Title: WordPress 3.1 &#8211; Potential WYSIWYG Bug
Last modified: August 19, 2016

---

# WordPress 3.1 – Potential WYSIWYG Bug

 *  [ctlockey](https://wordpress.org/support/users/ctlockey/)
 * (@ctlockey)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/)
 * In the last version of WP (I think I was using 3.0.3) I could add shortcode in
   the WYSIWYG link editor for internal links (e.g. `[site-url]/my-internal-page-
   link`) and then go back and edit these links with the WYSIWYG if needed, and 
   exactly what I typed would still be intact.
 * In WP 3.1, however, it changes the URL displayed in the WYSIWYG when you edit
   it to something more like `http://www.example.com/wp-admin/%5Bsite-url%5D/my-
   internal-page-link`.
 * It would be great if the new link editor would not do this. Don’t know if this
   is a bug or not, but it is annoying.
 * (And for anyone who is wondering why I choose to do this – I’m re-launching old,
   crappy sites and have to develop the new WP sites in a sub-directory then move
   it on launch, and would rather not have to update every internal link and image
   src on the site when I launch. – Of course, if there’s an easier solution for
   this, I’d love to hear it.)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950605)
 * It sounds like `[site-url]` isn’t a valid shortcode. Was this a plugin that created
   it? I’ve never heard of it, and Google fails me…
 *  Thread Starter [ctlockey](https://wordpress.org/support/users/ctlockey/)
 * (@ctlockey)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950610)
 * I created it in my functions.php following the instructions on the codex.
 *     ```
       // [site-url]
       function siteUrl_func( $atts ) {
       	return home_url();
       }
       add_shortcode( 'site-url', 'siteUrl_func' );
       ```
   
 * my inspiration: [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)
 * Is this not something we can do? It works when I use it, even with the WYSIWYG,
   just goofs up when I try to edit…
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950628)
 * Huh. I can’t repro that with built in shortcodes (like [gallery])
 * > (And for anyone who is wondering why I choose to do this – I’m re-launching
   > old, crappy sites and have to develop the new WP sites in a sub-directory then
   > move it on launch, and would rather not have to update every internal link 
   > and image src on the site when I launch. – Of course, if there’s an easier 
   > solution for this, I’d love to hear it.)
 * How SQL savvy are you? I just tend to move it all and then search/replace my 
   SQL.
 *  Thread Starter [ctlockey](https://wordpress.org/support/users/ctlockey/)
 * (@ctlockey)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950630)
 * I’m not horrible with SQL, and saw that suggestion elsewhere, but didn’t know
   how to get into selecting/finding/replacing from multiple tables with one command.(
   Don’t want to replace anything I shouldn’t and break the whole thing…)
 * Could you recommend a generic query that I could use to base my queries off of?
   That would be tons easier than editing the URL every time I create an internal
   link with WP3.1’s sweet new “existing content” WYSIWYG editor.
 * Thanks for your help, BTW.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950632)
 * [http://digwp.com/2010/03/remove-replace-content-wordpress-database/](http://digwp.com/2010/03/remove-replace-content-wordpress-database/)
   is a great resource 🙂
 *     ```
       UPDATE wp_posts SET post_content = REPLACE ( post_content, 'oldURL', 'newURL' );
       ```
   
 * That’s all I ever do. Obviously you backup the DB first, but it’s yet to fail
   me 🙂
 *  Thread Starter [ctlockey](https://wordpress.org/support/users/ctlockey/)
 * (@ctlockey)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950633)
 * Awesome. I’ll give this a try and abandon my quest to reinvent the wheel.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘WordPress 3.1 – Potential WYSIWYG Bug’ is closed to new replies.

## Tags

 * [link editor](https://wordpress.org/support/topic-tag/link-editor/)
 * [wordpress 3.1](https://wordpress.org/support/topic-tag/wordpress-3-1/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [ctlockey](https://wordpress.org/support/users/ctlockey/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/wordpress-31-potential-bug/#post-1950633)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
