diff --git a/bridges/InstagramBridge.php b/bridges/InstagramBridge.php
index dc248b14..11fe2357 100644
--- a/bridges/InstagramBridge.php
+++ b/bridges/InstagramBridge.php
@@ -160,6 +160,11 @@ class InstagramBridge extends BridgeAbstract {
$mediaURI = self::URI . 'p/' . $media->shortcode . '/media?size=l';
}
+ $pattern = array('/\@([\w\.]+)/', '/#([\w\.]+)/');
+ $replace = array(
+ '@$1',
+ '#$1');
+
switch($media->__typename) {
case 'GraphSidecar':
$data = $this->getInstagramSidecarData($item['uri'], $item['title'], $media, $textContent);
@@ -169,7 +174,7 @@ class InstagramBridge extends BridgeAbstract {
case 'GraphImage':
$item['content'] = '';
$item['content'] .= '
';
- $item['content'] .= '
' . nl2br(htmlentities($textContent));
+ $item['content'] .= '
' . nl2br(preg_replace($pattern, $replace, htmlentities($textContent)));
$item['enclosures'] = array($mediaURI);
break;
case 'GraphVideo':