Hello thanks for reading my question🙂
I have a wysiwyg editor built into my admin panel and there seems to be a bug in it. the but is when adding an image the title tag and alt tag have a space in it
alt="my image " title="my image " I'm wondering if I can do anything about it before I write it to the db.
trim() only seems to do begin and end of the whole string, and the other problem is it doesn't happen all the time so it's probably my fault when I add the tags.
I know this is probably going to be freaking complicated but I need to search for a string for title and alt the get the data between the following " and " and someone how only trim the end if it's a white space or somehow make a var = to the whole value between the quotes and then use trim()....I have no clue how to even start on this.
Thanks for any help pointing me in the right direction...thanks