bug #39223 [Console] Re-enable hyperlinks in Konsole/Yakuake (OndraM)

This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Re-enable hyperlinks in Konsole/Yakuake

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #31809 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Hyperlinks feature was broken in KDE's Konsole/Yakuake (#31809) and thus disabled by #31849.

But the feature has been recently [implemented](https://invent.kde.org/utilities/konsole/-/merge_requests/138), and is about to be released in KDE 20.12 on December 10th 2020, see [release notes](https://community.kde.org/Releases/20.12_Release_Notes#Konsole).

![obrazek](https://user-images.githubusercontent.com/793041/100556284-92dccf00-32a1-11eb-9907-f65c2eaa1335.png)

Tested in RC version and seems to be working fine. The feature is disabled by default (as per security concerns), but even when disabled, it just gracefully don't show the links.

Commits
-------

728edf36bf [Console] Enable hyperlinks in Konsole/Yakuake
This commit is contained in:
Robin Chalas 2020-11-30 17:35:14 +01:00
commit da65c57fb4
2 changed files with 4 additions and 2 deletions

View File

@ -166,7 +166,8 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$unsetCodes = [];
if (null === $this->handlesHrefGracefully) {
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') && !getenv('KONSOLE_VERSION');
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR')
&& (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100);
}
if (null !== $this->foreground) {

View File

@ -439,7 +439,8 @@ class CliDumper extends AbstractDumper
}
if (null === $this->handlesHrefGracefully) {
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') && !getenv('KONSOLE_VERSION');
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR')
&& (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100);
}
if (isset($attr['ellipsis'], $attr['ellipsis-type'])) {