Issue 121343 - Writer does not properly format hyperlink text on page
Summary: Writer does not properly format hyperlink text on page
Status: REOPENED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: 3.4.1
Hardware: PC Windows XP
: P3 Minor (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2012-11-12 03:53 UTC by Mohanned Sakallah
Modified: 2014-04-13 20:08 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Source document with 65527 characters used for testing (8.33 KB, application/octet-stream)
2013-09-24 18:52 UTC, Andrew_M_Freyman
no flags Details
Success case fpr 65526 character string (10.53 KB, application/vnd.oasis.opendocument.text)
2013-09-24 18:53 UTC, Andrew_M_Freyman
no flags Details
Success case for forward slash within 65527 long string (10.60 KB, application/vnd.oasis.opendocument.text)
2013-09-24 18:54 UTC, Andrew_M_Freyman
no flags Details
Success case for question mark within 65527 character string (10.71 KB, application/vnd.oasis.opendocument.text)
2013-09-24 18:55 UTC, Andrew_M_Freyman
no flags Details
Success case for typical web address format (10.72 KB, application/vnd.oasis.opendocument.text)
2013-09-24 18:56 UTC, Andrew_M_Freyman
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Mohanned Sakallah 2012-11-12 03:53:53 UTC
Issue:
OO Writer does not properly format hyperlink text on page if value for TARGET field under Hyperlink if is too long and above certain length. While testing, the field can accept up to 65534 characters. However, it will fail to display hyperlink on the page if the TARGET string is 65527 characters or longer

Steps to Reproduce:
In the Target field under Hyperlink, input a string with 65527 characters in length, then click on Apply

Expected Behavior:
Hyperlink will display properly formatted on page as http://<string>, where <string> is the inputted string in TARGET field

Actual Behavior:
Hyperlink does not display
Comment 1 Rob Weir 2012-11-13 01:41:11 UTC
Would it be possible to attach your test document, ideally one that shows 65526 characters working correctly and 65527 characters not working?
Comment 2 Ariel Constenla-Haile 2012-11-13 02:24:40 UTC
(In reply to comment #0)
> Issue:
> OO Writer does not properly format hyperlink text on page if value for
> TARGET field under Hyperlink if is too long and above certain length. While
> testing, the field can accept up to 65534 characters. 

This is one of the string classes used internally, it can hold only up to STRING_MAXLEN, defined in tools/inc/tools/string.hxx
Comment 3 Javier Lopez 2013-04-12 01:14:16 UTC
Hello.
I have been watching this bug reported and I created the file when your steps  but the hyperlink is correct. The bug was checked in the platform W7 64BITS AOO 3.4.1 and I was not found it.
Could you give the hyperlink that you used or attach a document?
Comment 4 Andrew_M_Freyman 2013-09-24 18:52:23 UTC
Created attachment 81626 [details]
Source document with 65527 characters used for testing

I was able to reproduce this issue in certain scenarios.

OpenOffice.org Writer 3.4.1
AOO341m1(Build:9593) - Rev. 1372282
Windows 7 Home Premium, Service Pack 1

1. Open Writer blank document
2. Click Hyperlink button on toolbar or click Insert-->Hyperlink from menu
3. Delete any value or whitespace in Target text box if there is any
4. Copy Target value from source document (my source document is attached, I used this document to change the Target value for the scenarios listed below)
5. Paste [value] into Target field (actual values I used listed below)
6. The Target text box shows as blank white, but the cursor location being at the end of the text box and ability to arrow left and right within the text box indicate that some value has been pasted.
7. Click Apply

When the issue is reproduced, the program appears to do nothing and continues to display the Hyperlink box, so attaching a document that "doesn't work" is the same as attaching a blank document.  Values that reproduced the issue (to be used in step 5 above):

1. 65527 character string of the repeating letter 'a'
- Confirmed that repeating 'a' string of 65526 characters works as expected, although it does add a forward slash on the end, something it doesn't seem to do for scenarios 4 and 5 below [attached]
2. aaa-aaaaaaaaa... (same as #1 except fourth character is a dash)
3. aaa.aaaaaaaaa... (same as #1 except fourth character is a period)

Values that did not reproduce the issue:

4. www.test.com/aaaaaa... ('a' is repeating to fill up 65527 total characters)
- Result as expected:  Link reading http://www.test.com/aaaaaa...
5. aaa/aaaaaaaaa... (same as #1 except fourth character is a forward slash)
- Result as expected:  Link reading http://aaa/aaaaaaaaa...

Value that produced a different issue:

6. aaa?aaaaaaaaa... (fourth character is a question mark) [attached]
- Result missing the 'http://': Link reading aaa?aaaaaaaa...

While the HTTP protocol does not place a limit on the length of a URI (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html), there are many reasons why the majority of web URLs are not likely to be this lengthy, here’s a few (http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers): 

1. Search giant Google will not index URLs over 2047 characters, and technically only 1855 characters results in a URL that works in Google search results (research from 2010)
2. Internet Explorer 10’s address bar will only accept and display 2083 characters, although you can still click a URL that is longer.
3. Servers and browsers have the ability to limit the acceptable length of the URL
Comment 5 Andrew_M_Freyman 2013-09-24 18:53:31 UTC
Created attachment 81627 [details]
Success case fpr 65526 character string
Comment 6 Andrew_M_Freyman 2013-09-24 18:54:31 UTC
Created attachment 81628 [details]
Success case for forward slash within 65527 long string
Comment 7 Andrew_M_Freyman 2013-09-24 18:55:37 UTC
Created attachment 81629 [details]
Success case for question mark within 65527 character string
Comment 8 Andrew_M_Freyman 2013-09-24 18:56:12 UTC
Created attachment 81630 [details]
Success case for typical web address format
Comment 9 Edwin Sharp 2014-04-13 19:40:22 UTC
Not a real life scenario.
Comment 10 Mohanned Sakallah 2014-04-13 20:05:41 UTC
(In reply to Edwin Sharp from comment #9)
> Not a real life scenario.
May be true. But I can happen. And MS Office and similar Apple products(Page, Word) don't have or exhibit this issue.

I really encourage you to resolve this issue. Even if you think its not a "real life" scenario.
Comment 11 Edwin Sharp 2014-04-13 20:08:41 UTC
Please attach example.