Retrieve text() instead of html() and trim() whitespace

I used a custom function, trimText(), to remove whitespace
from the start and end of the extracted text.
Remove whitespace from start and end of extracted text values