View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011558 | mantisbt | public | 2010-02-25 10:56 | 2021-01-17 04:38 | |
Reporter | ecaplan | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 1.2.0 | ||||
Summary | 0011558: email_send applies "bug tag" processing without asking | ||||
Description | The email_send() function in core/email_api.php processes "bug tags" without regard to whether I (the caller) want it to or not. Better, I would like to have a way to prevent specific "#n" strings from being treated as bug tags, while still processing other instances of #n as bug tags. The real work is done in string_process_bug_link() in core/string_api.php | ||||
Steps To Reproduce | This is a problem for me in instances like this: $t_email_data.body = "I'm 0000001! See Bug #1234"; Here, "0000001" should NOT be expanded as a bug tag, but "#1234" should. How about an escape character "#" -- e.g. "I'm #0000001!" -- which would treat the convert "##" to a single "#" and not expand it? Thus: $t_email_data.body = "I'm #0000001! See Bug #1234"; | ||||
Tags | admin | ||||
Here's an irony. The example bug tags in my submitted ticket were replaced when I didn't want them to. And the email I received from MantisBT.org confirming my submission had them replaced as well: $t_email_data.body = "I'm http://www.mantisbt.org/bugs/view.php?id=1! See Bug http://www.mantisbt.org/bugs/view.php?id=1234"; |
|
the pattern triggering links is customizable with $g_bug_link_tag. The default is: $g_bug_link_tag = '#'; but you can use something else and avoid the issue. For the records, I think using # as default is not a good idea and we should change it, but first we need to create some admin utility to convert existing bug tags to the new format. |
|
I'd think the default would have to be some string unlikely to appear in any other context, e.g: [BUGLINK:1234] Even then, it will come up that somebody will want "[BUGLINK:1234]" to not be expanded.... like in this note. So an override/quote would be useful. Thanks for your attention to this! |
|
While you attend to this, something similar should be done for: $b_bugnote_link_tag = '~'; Thank you |
|