common_hidden('token', common_session_token());
common_element('h2', NULL, _('URL Auto-shortening'));
-
$services = array(
'' => 'None',
'ur1.ca' => 'ur1.ca (free service)',
'metamark.net' => 'metamark.net'
);
- common_dropdown('urlshorteningservice', _('Service'), $services, _('Shortening service to use when notices exceed the 140 character limit.'), FALSE, $user->urlshorteningservice);
+ common_dropdown('urlshorteningservice', _('Service'), $services, _('Shortening service to use when notices exceed the 140 character limit. Precede a URL with a * to prevent shortening of that URL.'), FALSE, $user->urlshorteningservice);
common_submit('save', _('Save'));
function common_shorten_links($text) {
$r = htmlspecialchars($text);
// \s = not a horizontal whitespace character (since PHP 5.2.4)
-// $r = preg_replace('@[^*]https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
- $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
+ $r = preg_replace('@[^*]https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
+// $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
return $r;
}