Fixes of last commit. Correct count of regex match, avoid leak, match html escapes for AID tag. 
Fixes of last commit. Correct count of regex match, avoid leak, match html escapes for AID tag. 

git-svn-id: cb3fc60f0f557b927b8032d8a94e869b6f9f230b@655 0fceea05-a30d-0410-8a8b-80ef821fb0a1

camillobruni/skim,camillobruni/skim,jasongrout/skim,jasongrout/skim,camillobruni/skim,camillobruni/skim