Convert expressions found in text nodes; convert JS logic operators to Python ones.