From: GitHub <no...@gi...> - 2016-07-03 09:56:45
|
Branch: refs/heads/master-1.3.x Home: https://github.com/mantisbt/mantisbt Commit: 352d8f777e00d622d2ec494944990effde062b13 https://github.com/mantisbt/mantisbt/commit/352d8f777e00d622d2ec494944990effde062b13 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M tests/Mantis/MentionParsingTest.php Log Message: ----------- Tests: add case for issue #21083 Commit: db419f49583d8459c5b3113af12c543e49bd3b33 https://github.com/mantisbt/mantisbt/commit/db419f49583d8459c5b3113af12c543e49bd3b33 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/mention_api.php Log Message: ----------- Remove unnecessary test mention_get_users() already checks whether mentions are enabled and returns an empty array if not, so we can remove this test. Commit: a0c5647015c91c76b58b03d77384b4ff2c9e4bd5 https://github.com/mantisbt/mantisbt/commit/a0c5647015c91c76b58b03d77384b4ff2c9e4bd5 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/mention_api.php Log Message: ----------- Replace deprecated <strike> tag by <s> Commit: 987223b8036638b3783e4adbfeeabad88efac1b8 https://github.com/mantisbt/mantisbt/commit/987223b8036638b3783e4adbfeeabad88efac1b8 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/mention_api.php Log Message: ----------- Use $g_user_login_valid_regex for mentions parsing Commit: dc6620520421b747b28da9bcd1af078aaeb0fe6b https://github.com/mantisbt/mantisbt/commit/dc6620520421b747b28da9bcd1af078aaeb0fe6b Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/mention_api.php Log Message: ----------- Use specific regex for parsing mentions It turns out that the current $g_user_login_valid_regex pattern cannot be used as it allows spaces. Furthermore, special handling is required to process e-mail address-like strings. For this reason, a custom regex is built for the purpose of mentions parsing, supporting only a subset of the allowed usernames. Fixes #21083 Commit: b4f592f79badf906f78c455e52d189800ca8ed8e https://github.com/mantisbt/mantisbt/commit/b4f592f79badf906f78c455e52d189800ca8ed8e Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M tests/Mantis/MentionParsingTest.php Log Message: ----------- Tests: use data provider function This is easier to maintain and more efficient than using individual methods for each test case. Commit: fbba81331887bf3be74ad2634d03962b23c54fd0 https://github.com/mantisbt/mantisbt/commit/fbba81331887bf3be74ad2634d03962b23c54fd0 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M tests/Mantis/MentionParsingTest.php Log Message: ----------- Tests: remove checkMentions function With the use of data provider function, it is no longer necessary to have a private function to perform the checks, they can be done in testMentions() directly. Commit: 5466ec8f3e2996119c8f43511eb647ccdad24585 https://github.com/mantisbt/mantisbt/commit/5466ec8f3e2996119c8f43511eb647ccdad24585 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M tests/Mantis/MentionParsingTest.php Log Message: ----------- Test: simplify testMentions assertEquals is able to compare 2 arrays, so there is really no need to manually check the array count and the individual elements via foreach. Commit: a9f2f2b2692f91714e4fb3f4feab84b672483cd3 https://github.com/mantisbt/mantisbt/commit/a9f2f2b2692f91714e4fb3f4feab84b672483cd3 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M tests/Mantis/MentionParsingTest.php Log Message: ----------- Mention tests: invert MentionWithInvalidChars case 'vboctor%%%' should match 'vboctor', as discussed in https://github.com/mantisbt/mantisbt/pull/786#issuecomment-225468428A Commit: b1c9174239344828f5f87a41a65ab2e40b95995c https://github.com/mantisbt/mantisbt/commit/b1c9174239344828f5f87a41a65ab2e40b95995c Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/string_api.php Log Message: ----------- New string_process_exclude_anchors() API function Processes a string by applying a callback function to the text between anchor tags (the anchors themselves will be left as-is). The new function is used to process the mailto links in string_insert_hrefs(). Commit: e5e6858c8ae88d3d948734d3d849056f60e8b89f https://github.com/mantisbt/mantisbt/commit/e5e6858c8ae88d3d948734d3d849056f60e8b89f Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/mention_api.php Log Message: ----------- Fix Mentions replacement corrupting mailto links mention_format_text() is called after string_insert_hrefs(). Since formatted mailto links contains text that may be interpreted as mention tags, we need to make sure we only perform replacement of the tags excluding existing anchors. Commit: 166930eb4c3c04087c1df6ec0957df1f0fa4a712 https://github.com/mantisbt/mantisbt/commit/166930eb4c3c04087c1df6ec0957df1f0fa4a712 Author: Damien Regad <dr...@ma...> Date: 2016-07-03 (Sun, 03 Jul 2016) Changed paths: M core/mention_api.php M core/string_api.php M tests/Mantis/MentionParsingTest.php Log Message: ----------- Fix #21083: User @ mentions improvements PR https://github.com/mantisbt/mantisbt/pull/786 Compare: https://github.com/mantisbt/mantisbt/compare/9ed0b9f5d1f9...166930eb4c3c |