[wp-trac] [WordPress Trac] #6737: TinyMCE converts relative links incorrectly (adds wp-admin)

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 15 17:19:00 GMT 2008


#6737: TinyMCE converts relative links incorrectly (adds wp-admin)
----------------------+-----------------------------------------------------
 Reporter:  Otto42    |       Owner:  anonymous                
     Type:  defect    |      Status:  new                      
 Priority:  high      |   Milestone:  2.5.1                    
Component:  TinyMCE   |     Version:  2.5                      
 Severity:  critical  |    Keywords:  needs-testing 2nd-opinion
----------------------+-----------------------------------------------------
 TinyMCE has a feature that auto-converts relative links to absolute ones.
 This is a good thing for WordPress, since anybody using non-default
 permalinks needs this feature for their links to work.

 The problem is that TinyMCE in 2.5 is converting all the relative links as
 if they are in the wp-admin path. This is breaking image insertion as
 well, for some people.

 The root cause is the lack of a defined "document_base_url" setting. When
 TinyMCE cannot find one, it uses the current url of the page it's in,
 which happens to be the write page in wp-admin.

 Possible, but untested, fix is to add this to the tiny-mce-config.php
 file:
 {{{
 'document_base_url' => get_option('url'),
 }}}

 This should set the site root as the correct base and allow it to convert
 the relative links correctly, as the user would expect it to convert them.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6737>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list