use title if content is empty for rtl detection
moving some code around