Fix PostType parsing when fragment is a uri
Add toURIString() method to PostType for encoding fragment