Title: replace_vars() problem in HTML Emails for User Registration
Last modified: August 20, 2016

---

# replace_vars() problem in HTML Emails for User Registration

 *  Resolved [hlant](https://wordpress.org/support/users/hlant/)
 * (@hlant)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/replace_vars-problem-in-html-emails-for-user-registration/)
 * Hello, there is a logic problem in the output of HTML emails when a percent symbol
   exists in the template. In the /wp-content/plugins/theme-my-login/modules/custom-
   email/custom-email.php file, the function replace_vars() matches all text between%
   symbols, so if you have an inline style of width:100%, then content will be lost.
 * I recommend changing
    preg_match_all( ‘/%([^%]*)%/’, $input, $matches ); to preg_match_all(‘/%([
   a-zA-Z0-9-_]*)%/’, $input, $matches );
 * as the variables only contain letters, numbers and underscores.
 * [http://wordpress.org/extend/plugins/theme-my-login/](http://wordpress.org/extend/plugins/theme-my-login/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * (@jfarthing84)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/replace_vars-problem-in-html-emails-for-user-registration/#post-3347954)
 * Interesting. Never thought of that. I’ve updated this in the trunk.

Viewing 1 replies (of 1 total)

The topic ‘replace_vars() problem in HTML Emails for User Registration’ is closed
to new replies.

 * ![](https://ps.w.org/theme-my-login/assets/icon-256x256.png?rev=1891232)
 * [Theme My Login](https://wordpress.org/plugins/theme-my-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-my-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-my-login/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-my-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-my-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-my-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/replace_vars-problem-in-html-emails-for-user-registration/#post-3347954)
 * Status: resolved