This topic is locked

Disable / Remove HTML <base> element from imported emails

6/27/2018 7:20:57 AM
PHPRunner General questions
S
seedavidwork author

I am using the EmailReader template to import email into my application from several frequent senders. Recently I have discovered one occasional email sender uses an HTML <base> tag redirecting links in their auto generated email to their own website. If this email is being displayed in my web app it breaks all my relative links. Any link I click in my PHPRunner web app redirects to the the base link set in the email HTML.
I have fixed this as it occurs by manually editing the tag from the email body field in my database, but this has to be done manually after the my website links break and I am notified.
Is there an easy way to strip this tag so it will not be saved in the database or some way to block the tag in the application code so that if it's in the database it will not be present in the HTML formatted body field which displays my email content.
Here is an snip of email with the offending code...