refactor url truncation and filter out empty urls too
change truncation string to avoid it being escaped in post requests