From 15c1d4f5e4947b9c60439ab5a17694ad57d06704 Mon Sep 17 00:00:00 2001 From: millette Date: Thu, 6 Nov 2008 15:59:26 -0500 Subject: trac31 url_auto_shortening by sgmurphy darcs-hash:20081106205926-099f7-6bcfd7969a159a12b1ba6a9ee254e44a07b94761.gz --- actions/postnotice.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'actions/postnotice.php') diff --git a/actions/postnotice.php b/actions/postnotice.php index be486a1e9..b4a272e61 100644 --- a/actions/postnotice.php +++ b/actions/postnotice.php @@ -59,8 +59,11 @@ class PostnoticeAction extends Action { } $content = $req->get_parameter('omb_notice_content'); if (!$content || strlen($content) > 140) { - common_user_error(_('Invalid notice content'), 400); - return false; + $content = common_shorten_links($content); + if (mb_strlen($content) > 140) { + common_user_error(_('Invalid notice content'), 400); + return false; + } } $notice_uri = $req->get_parameter('omb_notice'); if (!Validate::uri($notice_uri) && -- cgit v1.2.3-54-g00ecf