NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.55k stars 643 forks source link

[README]: Support mailto links #8731

Open Abishake968 opened 3 years ago

Abishake968 commented 3 years ago

Impact

Other

Describe the bug

Added [xyz@gmail.com](mailto:xyz@gmail.com?Subject="Subject of mail") line in README md file for nuget package and publish it in nuget.org. But this link from Readme in nuget.org page navigates to the corresponding nuget package link instead of open mail box.

Repro Steps

Steps to reproduce this issue.

  1. Create a README.md file with [xyz@gmail.com](mailto:xyz@gmail.com?Subject="Subject of mail") line.
  2. Add a README.md file into nuget package and add README.md in spec file.
  3. Publish the nugget in nuget.org and click Mail-ID link from readme content it's navigate corresponding package link

Expected Behavior

We need to open a Mail with mentioned mailid and subject in this line [xyz@gmail.com](mailto:xyz@gmail.com?Subject="Subject of mail") while clicking this link

Screenshots

No response

Additional Context and logs

No response

joelverhagen commented 3 years ago

Thanks for the heads up @Abishake968. Do you have an example package that exhibits this problem?

loic-sharma commented 3 years ago

FYI we could assess how common this scenario is on GitHub projects using this: https://github.com/loic-sharma/readme-experiments

The "readmes" folder contains the READMEs for all popular C# GitHub projects, which can then be analyzed here: https://github.com/loic-sharma/readme-experiments/blob/0c8e20d8d87001f4b4d66e24abe0c152f4300f78/src/AnalyzeReadmes/Program.cs#L150

To compare GitHub vs nuget.org markdown rendering, I've uploaded all these READMEs to DEV with package ID loic.<gh owner>.<gh repo>. For example: https://dev.nugettest.org/packages/Loic.JamesNK.Newtonsoft.Json/1.0.0?preview=1#show-readme-container

loic-sharma commented 3 years ago

The following popular C# GitHub projects use non-HTTP URI schemes in their READMEs:

GitHub project NuGet REAMDE preview Stars Scheme Link
PowerShell/PowerShell Preview 27894 mailto mailto:REDACTED
NancyFx/Nancy Preview 7140 mailto mailto:REDACTED
HangfireIO/Hangfire Preview 6836 mailto mailto:REDACTED
microsoft/ailab Preview 6651 mailto mailto:REDACTED
microsoft/FASTER Preview 4618 mailto mailto:REDACTED
microsoft/MixedRealityToolkit-Unity Preview 4609 mailto mailto:REDACTED
microsoft/reverse-proxy Preview 3596 mailto mailto:REDACTED
protobuf-net/protobuf-net Preview 3493 mailto mailto:REDACTED
inkle/ink Preview 2839 mailto mailto:REDACTED
OfficeDev/Open-XML-SDK Preview 2836 mailto mailto:REDACTED
skoruba/IdentityServer4.Admin Preview 2817 mailto mailto:REDACTED
KeenSoftwareHouse/SpaceEngineers Preview 2812 github windows,github-windows://openrepo/https://github.com/KeenSoftwareHouse/SpaceEngineers
googlevr/gvr-unity-sdk Preview 2692 file file://developers.google.com/cardboard
googlevr/gvr-unity-sdk Preview 2692 file file://arvr.google.com/daydream/smartphonevr/
googlevr/gvr-unity-sdk Preview 2692 file file://developers.google.com/vr/distribute/daydream/
googlevr/gvr-unity-sdk Preview 2692 file file://play.google.com/store/apps/details%3Fid=com.google.android.vr.home
googlevr/gvr-unity-sdk Preview 2692 file file://github.com/googlevr/gvr-unity-sdk/releases
googlevr/gvr-unity-sdk Preview 2692 file file://unity3d.com/get-unity/download
googlevr/gvr-unity-sdk Preview 2692 file file://developers.google.com/vr/unity/get-started
googlevr/gvr-unity-sdk Preview 2692 file file://developers.google.com/vr/unity/get-started-ios
Azure/azure-powershell Preview 2682 mailto mailto:REDACTED
NoelFB/Celeste Preview 2496 mailto mailto:REDACTED
Azure/azure-sdk-for-net Preview 2473 mailto mailto:REDACTED
Glimpse/Glimpse Preview 2309 mailto mailto:REDACTED
keenanwoodall/Deform Preview 2286 mailto mailto:REDACTED
bridgedotnet/Bridge Preview 2248 mailto mailto:REDACTED
p-org/P Preview 2114 mailto mailto:REDACTED
PowerShell/PSReadLine Preview 2085 mailto mailto:REDACTED
microsoft/AttackSurfaceAnalyzer Preview 2075 mailto mailto:REDACTED
microsoft/aspnet-api-versioning Preview 2058 mailto mailto:REDACTED
confluentinc/confluent-kafka-dotnet Preview 1997 mailto mailto:REDACTED
googlevr/tilt-brush Preview 1905 unityhub unityhub://2018.4.11f1/7098af2f11ea
pnp/PnP Preview 1843 mailto mailto:REDACTED
CollaboratingPlatypus/PetaPoco Preview 1826 file file://github.com/asherber/PetaPoco.SqlKata
CollaboratingPlatypus/PetaPoco Preview 1826 file file://sqlkata.com/
CollaboratingPlatypus/PetaPoco Preview 1826 file file://github.com/CollaboratingPlatypus/PetaPoco/wiki/Building-SQL-Queries
CollaboratingPlatypus/PetaPoco Preview 1826 file file://github.com/asherber/StaTypPocoQueries.PetaPoco
CollaboratingPlatypus/PetaPoco Preview 1826 file file://github.com/hippasus/PetaPoco.DBEntityGenerator
microsoft/nodejstools Preview 1769 mailto mailto:REDACTED
microsoft/nodejstools Preview 1769 mailto mailto:REDACTED
UnityCommunity/UnityLibrary Preview 1671 mailto mailto:REDACTED
rebus-org/Rebus Preview 1640 mailto mailto:REDACTED
apache/lucenenet Preview 1627 mailto mailto:REDACTED
MetacoSA/NBitcoin Preview 1586 mailto mailto:REDACTED
Azure/azure-functions-host Preview 1584 mailto mailto:REDACTED
kwwwvagaa/NetWinformControl Preview 1561 file file://shang.qq.com/wpa/qunwpa%3Fidkey=6e08741ef16fe53bf0314c1c9e336c4f626047943a8b76bac062361bab6b4f8d
Syomus/ProceduralToolkit Preview 1542 mailto mailto:REDACTED
nxrighthere/UnrealCLR Preview 1516 mailto mailto:REDACTED
Tayx94/graphy Preview 1443 mailto mailto:REDACTED
lgsvl/simulator Preview 1437 mailto mailto:REDACTED
enkodellc/blazorboilerplate Preview 1366 mailto mailto:REDACTED
google-ar/arcore-unity-sdk Preview 1364 file file://github.com/google-ar/arcore-unity-extensions
google-ar/arcore-unity-sdk Preview 1364 file file://developers.google.com/ar/develop/unity/getting-started
google-ar/arcore-unity-sdk Preview 1364 file file://developers.google.com/ar/reference/unity
google-ar/arcore-unity-sdk Preview 1364 file file://github.com/google-ar/arcore-unity-sdk/releases
google-ar/arcore-unity-sdk Preview 1364 file file://developers.google.com/terms/
google-ar/arcore-unity-sdk Preview 1364 file file://play.google.com/store/apps/details%3Fid=com.google.ar.core
google-ar/arcore-unity-sdk Preview 1364 file file://policies.google.com/privacy
google-ar/arcore-unity-sdk Preview 1364 file file://developers.google.com/ar/distribute/deprecation-policy
NuGet/NuGetGallery Preview 1328 mailto mailto:REDACTED
microsoftarchive/cqrs-journey Preview 1259 mailto mailto:REDACTED
amaneureka/AtomOS Preview 1241 mailto mailto:REDACTED
PowerShell/PSScriptAnalyzer Preview 1222 mailto mailto:REDACTED
Azure/iotedge Preview 1207 mailto mailto:REDACTED
microsoft/Trill Preview 1142 mailto mailto:REDACTED
Baseflow/LottieXamarin Preview 1120 mailto mailto:REDACTED
loklak/loklak_dotnet_api Preview 1113 mailto mailto:REDACTED
microsoft/coyote Preview 1078 mailto mailto:REDACTED
Depressurizer/Depressurizer Preview 1038 mailto mailto:REDACTED
microsoft/RulesEngine Preview 1037 mailto mailto:REDACTED
microsoft/VSSDK-Extensibility-Samples Preview 1011 mailto mailto:REDACTED
baronfel commented 3 years ago

The AutoLinks markdig extension supports this, however it also auto-links http/https/ftp links which may not be desired here. It might be worth offering an enhancement to the AutoLinksOptions to limit the kinds of links that are expanded.