From 73de0c5bd5da756398b1120dffb71b12a8a5976b Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 28 Sep 2022 10:22:27 +0200 Subject: [PATCH] fix --> $str = preg_replace('##', '', $str); - // fix <(textbox|int(eger)?|float) precision="int(eger)?|float" .../> --> or - $str = preg_replace_callback('#<(textbox|int(eger)?|float|number).*?\s(type="(int(eger)?|float)")?.*?(/|>#', + // fix <(textbox|int(eger)?|float|passwd) precision="int(eger)?|float|passwd" .../> --> , or + $str = preg_replace_callback('#<(textbox|int(eger)?|float|number|passwd).*?\s(type="(int(eger)?|float|passwd)")?.*?(/|>#', static function ($matches) { + if ($matches[1] === 'passwd' || $matches['4'] === 'passwd') + { + return ''; + } if ($matches[1] === 'textbox' && !in_array($matches[4], ['float', 'int', 'integer'], true)) { return ''; // regular textbox --> nothing to do @@ -296,8 +301,6 @@ function send_template() return ''; }, $str); - $str = preg_replace('#]+)(/|>#', '', $str); - // fix <(button|buttononly|timestamper).../> --> $str = preg_replace_callback('#<(button|buttononly|timestamper|button-timestamp|dropdown_button)\s(.*?)(/|>#s', function ($matches) use ($name) {