This does work for the other link though.
I got this from the forum.
could it be that the 'title attribute' is being used for your logic to set the EJS title var? But also being used for the regular title attribute?
Here the original post from George: Server Side Title Not Rendering in NodeJS SPA - #6 by George