If I enter a path like "/node/22" relative to the site, the leading slash gets stripped, and becomes "node/22".

Because some crawlers get confused by paths that do not start with /, I have been making sure to start all paths internal to my site with a /.

Moreover, TinyMCE strips the slash from paths that already have it. So, if I edit a node, all the paths starting with a / end up without it.

Is there a solution to this?

(By the way, Xinha is worse in this regards, it insists on making the path absolute by adding http://mysite.com before the path.

Comments

matt westgate’s picture

Status: Active » Closed (works as designed)

One solution is by overriding the tinymce init in your theme and adding

tinyMCE.init({
	...
	relative_urls : false
});
veelo’s picture

Matt: could you be more specific to how we do that? Which file should be edited at which place? I know tinyMCE.init is called from within tinymce/tinymce.module, but its arguments are contructed from a db query --- not straighforward to insert something there.

Are you suggesting to make an other tinyMCE.init call in tinymce/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js?
Would not that interfere with the one in tinymce.module?

Thanks,
Bastiaan Veelo.

mattconnolly’s picture

add a function like this to your theme's "template.php" file:

function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
// call original theme function
$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

$init['relative-urls'] = 'false';

return $init;
}