improved <p> and <div> parser
Merge pull request #5634 from dkuhnke/master

improved <p> and <div> parser