hook_url_outbound_alter only for links in node body I'm building a site with drafts/revisions as a major component. For now I'm using hook_url_outbound_alter to check if "/draft" is at the end of the current URL, and if so to append "/draft" to all paths. The problem is that it's also altering the Menu URLs. Is there any way that I can explicitly target links in the node body using hook_url_outbound_alter?
For the googlers:

Module:

/**
 * Implements hook_url_outbound_alter().
 */
function draft_links_url_outbound_alter(&amp;$path, &amp;$options, $original_path) {
  // Internal URLs only
  if (!$options['external']) {
    // Check if current page is draft page
    if (preg_match('|/draft(/?)$|', current_path())) {
      $options['alias'] = $path;
    }
  }
}

/**
 * Implements hook_preprocess_page().
 */
function draft_links_preprocess_page(&amp;$variables) {
  if (preg_match('|/draft/?$|', current_path())) {
    drupal_add_js(drupal_get_path('module', 'draft_links') .'/draft_links.js');
  }
}


JavaScript:

(function ($) {
    $(window).load(function() {
        $('.node__content a').each(function(){
            href = $(this).attr('href');
            // Internal URLs only.
            if (href.match(/^\/?[0-9a-zA-Z]*/) &amp;&amp; !href.match(/^(https?:)?\/{2}/)) {
                $(this).attr('href', href+'/draft');
            };
        });
    });
})(jQuery);