summaryrefslogtreecommitdiff
path: root/actions/postnotice.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/postnotice.php')
-rw-r--r--actions/postnotice.php7
1 files changed, 5 insertions, 2 deletions
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) &&