YAFLogo

balbes
  • balbes
  • 94% (Exalted)
  • YAF Lover Topic Starter
15 years ago
Occurs when post body contains full email adress

YAF.Classes.UI.FormatMsg method FormatMessage( string message, MessageFlags messageFlags, bool targetBlankOverride, DateTime messageLastEdited ) line 154

original code


				VariableRegexReplaceRule email =
					new VariableRegexReplaceRule(
						@"(?<before>^|[ ]|<br/>)(?<inner>\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)",
						"${before}<a href=\"mailto:${inner}\">${inner}</a>",
						_options,
						new string [] { "before" }
					);

fix


				VariableRegexReplaceRule email =
					new VariableRegexReplaceRule(
                        @"(?<before>^|[ ]|<br/>)(?<inner>(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6})",
						"${before}<a href=\"mailto:${inner}\">${inner}</a>",
						_options,
						new string [] { "before" }
					);

mir scheissegal
Sponsor
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
15 years ago
Thanks balbes.