Fixed separator generation logic

- HTML encoded `separator` property
- Move the generation of separator html out of loop to boost performance