diff --git a/hive/indexer/post_data_cache.py b/hive/indexer/post_data_cache.py
index 65a40997efd3d267892a8e0cb829502f3c01faa7..35c6ba1699821797da307e66840407edd1752555 100644
--- a/hive/indexer/post_data_cache.py
+++ b/hive/indexer/post_data_cache.py
@@ -5,9 +5,11 @@ log = logging.getLogger(__name__)
 DB = Db.instance()
 
 def escape_characters(text):
-    characters = ["'", "\\", "_", "%"]
+    characters = ["'", "_", "%"]
+    ret = str(text)
     for ch in characters:
-        text = text.replace(ch, "\\" + ch)
+        ret = ret.replace(ch, "\\" + ch)
+    return ret
 
 class PostDataCache(object):
     """ Procides cache for DB operations on post data table in order to speed up initial sync """
diff --git a/hive/server/tags_api/methods.py b/hive/server/tags_api/methods.py
index db846c5f7e2f05b1a63264c0e668aba135200c89..3f20f52ed6c68f0ddf0e6367bb8b0517ec37feaf 100644
--- a/hive/server/tags_api/methods.py
+++ b/hive/server/tags_api/methods.py
@@ -3,13 +3,32 @@ from hive.server.common.helpers import (
     valid_account,
     valid_permlink)
 
+
 @return_error_info
 async def get_active_votes(context, author: str, permlink: str):
     """ Returns all votes for the given post. """
     valid_account(author)
     valid_permlink(permlink)
-    # TODO: body
-    raise NotImplementedError()
+    db = context['db']
+    sql = """
+        SELECT 
+            ha_v.name as voter
+            ha_a.name as author
+            hpd.permlink as permlink
+            weight
+            rshares
+            vote_percent
+            last_update
+            num_changes
+        FROM
+            hive_votes hv
+        INNER JOIN hive_accounts ha_v ON ha_v.id = hv.voter_id
+        INNER JOIN hive_accounts ha_a ON ha_a.id = hv.author_id
+        INNER JOIN hive_permlink_data hpd ON hpd.id = hv.permlink_id
+        WHERE ha_a.name = :author AND hpd.permlink = :permlink
+    """
+    ret = await db.query_all(sql, author=author, permlink=permlink)
+    return ret
 
 @return_error_info
 async def get_tags_used_by_author(context, author: str):