issue-#184 HYPERLINK ignored in RTF import

issue-#184 HYPERLINK ignored in RTF import

Postby Josef Templ » Wed Mar 14, 2018 9:27 am

Based on the report by Helmut I have created https://redmine.blackboxframework.org/issues/184.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#184 HYPERLINK ignored in RTF import

Postby Josef Templ » Wed Mar 14, 2018 1:02 pm

I have prepared a fix for this issue.

See diffs at https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=72b7bc64d20fe00f40c34487fe4b045c31499277&rev_to=f48cfd280e9a107d5d6d697f05dd445e4e36379b.

There is a little difference to Helmut's proposal.
My approach is to do a full trim (trim left and trim right) of the field instruction.
This also solves the problem with the closing double quote, which is caused by a space
character appended. This way we are independent from any assumption about the
number of spaces appended.

A test version is available from http://blackboxframework.org/unstable/issue-%23184/blackbox-1.7.2-a1.1017.zip.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#184 HYPERLINK ignored in RTF import

Postby Zinn » Thu Mar 15, 2018 7:08 am

Josef,
perfect solution. You kill two birds with one stone.
About my problem with html (cut & paste from browser to BlackBox): Is there also a simple solution that the hyperlink is copied too? Other formatting I currently don't care.
- Helmut
Zinn
 
Posts: 472
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main

Re: issue-#184 HYPERLINK ignored in RTF import

Postby Josef Templ » Thu Mar 15, 2018 7:44 am

Zinn wrote:Josef,
About my problem with html (cut & paste from browser to BlackBox): Is there also a simple solution that the hyperlink is copied too? Other formatting I currently don't care.
- Helmut


As far as I know, there is currently only the path over RTF import.
Importing html directly would require an html data converter.
If you already have an html file converter it should be possible to
use that as a foundation of a data converter. You mainly have to strip off the
preceding html fragment description.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#184 HYPERLINK ignored in RTF import

Postby Josef Templ » Mon Mar 19, 2018 10:50 am

Are there any further comments on this issue?

One comment from my side is this:
I have added the Trim procedure to HostTextConv, where it is needed for the fix.
An obvious alternative would be to add it to module Strings.
This would be a general purpose feature then.
Since there are more procedures (e.g. TrimLeft, TrimRight, StartsWith, EndsWith, Match) that could be added to
Strings, I tried to keep the changes at a minimum for now and avoid the discussion on Strings extensions.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#184 HYPERLINK ignored in RTF import

Postby Robert » Mon Mar 19, 2018 11:05 am

Josef Templ wrote:Are there any further comments on this issue?

I have no particular comments. I do occasionally use RTF export, but probably never use RTF import!

I noticed that Trim looked a little out of place for a potentially generally useful function, but agree that moving it is a separate, and for me not urgent, discussion.
User avatar
Robert
 
Posts: 1023
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#184 HYPERLINK ignored in RTF import

Postby Bernhard » Mon Mar 19, 2018 12:00 pm

I am also quite unemotional about it here.
An obvious alternative would be to add it to module Strings.
This would be a general purpose feature then.

what about starting with a module StringUtils, which can be extended in the future with other general useful string utilities collecting them from places where these are used. I currently cannot foresee how much this would add at load time vs. saved lines of duplicated code. I also see that this might start lengthy discussions about what sould be included and what not, so I would say: go agead with it ...
Bernhard
 
Posts: 68
Joined: Tue Sep 17, 2013 6:56 am
Location: Munich, Germany


Return to Resolved (Bugs)

Who is online

Users browsing this forum: No registered users and 1 guest

cron