fixed sort order of projects
escaping entities in php layer