diff --git a/VKHS.cabal b/VKHS.cabal
--- a/VKHS.cabal
+++ b/VKHS.cabal
@@ -1,6 +1,6 @@
 
 name:                VKHS
-version:             0.3.0
+version:             0.3.1
 synopsis:            Provides access to Vkontakte social network via public API
 description:
     Provides access to Vkontakte API methods. Library requires no interaction
@@ -26,7 +26,7 @@
 
 library
   hs-source-dirs:    src
-  other-modules:     Test.Debug, Test.Data, Test.API, Network.Shpider.Forms, Network.Protocol.Uri, Network.Protocol.Mime, Network.Protocol.Http, Network.Protocol.Cookie, Network.Protocol.Uri.Remap, Network.Protocol.Uri.Query, Network.Protocol.Uri.Printer, Network.Protocol.Uri.Path, Network.Protocol.Uri.Parser, Network.Protocol.Uri.Encode, Network.Protocol.Uri.Data, Network.Protocol.Uri.Chars, Network.Protocol.Http.Status, Network.Protocol.Http.Printer, Network.Protocol.Http.Parser, Network.Protocol.Http.Headers, Network.Protocol.Http.Data  
+  other-modules:     Test.Debug, Test.Data, Test.API, Network.Shpider.Forms, Network.Protocol.Uri, Network.Protocol.Mime, Network.Protocol.Http, Network.Protocol.Cookie, Network.Protocol.Uri.Remap, Network.Protocol.Uri.Query, Network.Protocol.Uri.Printer, Network.Protocol.Uri.Path, Network.Protocol.Uri.Parser, Network.Protocol.Uri.Encode, Network.Protocol.Uri.Data, Network.Protocol.Uri.Chars, Network.Protocol.Http.Status, Network.Protocol.Http.Printer, Network.Protocol.Http.Parser, Network.Protocol.Http.Headers, Network.Protocol.Http.Data, Text.Namefilter, Text.PFormat
   exposed-modules:   Web.VKHS
                      Web.VKHS.API
                      Web.VKHS.API.Aeson
diff --git a/src/Text/Namefilter.hs b/src/Text/Namefilter.hs
new file mode 100644
--- /dev/null
+++ b/src/Text/Namefilter.hs
@@ -0,0 +1,17 @@
+module Text.Namefilter 
+  ( namefilter
+  ) where
+
+import Data.Char
+import Data.List
+import Text.RegexPR
+
+trim_space = gsubRegexPR "^ +| +$" ""
+one_space = gsubRegexPR " +" " "
+normal_letters = filter (\c -> or [ isAlphaNum c , c=='-', c=='_', c==' ', c=='&'])
+html_amp = gsubRegexPR "&amp;" "&"
+no_html = gsubRegexPR re "" where
+  re = concat $ intersperse "|" [ "&[a-z]+;" , "&#[0-9]+;" ]
+
+namefilter :: String -> String
+namefilter = trim_space . one_space . normal_letters . no_html . html_amp
diff --git a/src/Text/PFormat.hs b/src/Text/PFormat.hs
new file mode 100644
--- /dev/null
+++ b/src/Text/PFormat.hs
@@ -0,0 +1,24 @@
+module Text.PFormat 
+  ( pformat 
+  ) where
+
+import Data.List
+import Data.Maybe
+
+-- | Example: pformat '%' [('%',"%"), ('w',"world")] "hello %% %x %w"
+-- pformat' :: Char -> [(Char,String)] -> String -> String
+-- pformat' x d s = reverse $ scan [] s where
+--   scan h (c:m:cs)
+--     | c == x = scan ((reverse $ fromMaybe (c:m:[]) (lookup m d))++h) cs
+--     | otherwise = scan (c:h) (m:cs)
+--   scan h (c:[]) = c:h
+--   scan h [] = h
+
+pformat :: Char -> [(Char,a->String)] -> String -> a -> String
+pformat x d s a = reverse $ scan [] s where
+  scan h (c:m:cs)
+    | c == x = scan ((reverse $ fromMaybe (const $ c:m:[]) (lookup m d) $ a)++h) cs
+    | otherwise = scan (c:h) (m:cs)
+  scan h (c:[]) = c:h
+  scan h [] = h
+
