Ref T3868. Adds a link custom field that verifies and links to the text provided.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T3868: Implement a "Link" StandardCustomField
- Commits
- Restricted Diffusion Commit
rP1ab6ad3ee814: Add link custom field. - Required Signatures
L28 Phacility Individual Contributor License Agreement
Add a custom field with type "link", then enter a well-formed URL in the provided box in the edit task screen. Verify that the URL displays correctly on the task display page.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Fix lint, couple of inlines. Generally looks good.
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php | ||
---|---|---|
24–26 | I don't think we should imply a protocol. https:// is increasingly the right protocol, and is a safer default, but choosing either HTTP or HTTPS will break some links in a confusing way. Implying either protocol also means that the field won't faithfully reflect the value the user entered. I think it would be better to just return the text as plain text, but without mutating it, if it's missing a protocol or isn't a valid link for some other reason. | |
28 | If there's a value, but it's not a valid link, let's just return the value (as plain text) instead of returning null? Then users can at least see what was entered, even if they can't click it. |