Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonius Riha <antoniusriha@gmail.com>2012-03-21 19:18:22 +0400
committerAntonius Riha <antoniusriha@gmail.com>2012-03-21 19:18:22 +0400
commit5f17af18c97b80946cd8f6af0ce95729f8b6066e (patch)
tree6d12ee2fa29a5bca7cc3ff327574ca6801e8933e /docbrowser
parent14ae9cb9fd3253a88d36bc9fa506f9b8b2f1ddff (diff)
Fix url title malformation in docbrowser. Fixes #713340
The webkit library converts the url titles (N:, T:, etc.) to lower case (n:, t:, etc.) when clicking on a link. Titles that are max. one letter in length are now being converted to upper case, since the monodoc backend only understands upper case titles (except for root:, afaik).
Diffstat (limited to 'docbrowser')
-rw-r--r--docbrowser/browser.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/docbrowser/browser.cs b/docbrowser/browser.cs
index 5cc85e29..305987c8 100644
--- a/docbrowser/browser.cs
+++ b/docbrowser/browser.cs
@@ -733,6 +733,15 @@ public class Browser {
Node node;
+ /*
+ * The webkit library converts the url titles (N:, T:, etc.) to lower case (n:, t:, etc.)
+ * when clicking on a link. Therefore we need to convert them to upper case, since the
+ * monodoc backend only understands upper case titles (except for root:, afaik).
+ */
+ string[] urlParts = url.Split (':');
+ if (urlParts [0].Length == 1)
+ url = urlParts [0].ToUpper () + url.Substring (1);
+
Console.Error.WriteLine ("Trying: {0}", url);
try {
string res = Browser.GetHtml (url, null, help_tree, out node);