-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor simplification of LinkTest #566
Minor simplification of LinkTest #566
Conversation
The offending link is probably on The help-sites are
|
1622846
to
253e1a6
Compare
Even after eclipse-jdt/eclipse.jdt.debug#278 is merged and one I-build has passed the space in beginning is still found. Does anybody know from which repo the |
253e1a6
to
91cc996
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest merging your change and not trying to find the original HTML document. AFAIK blanks around URIs are valid in HTML: https://www.w3.org/TR/2014/REC-html5-20141028/infrastructure.html#valid-url-potentially-surrounded-by-spaces
If I get it right, the source containing the blank has already been fixed in #561. |
Yes that's right. We did track down the offending files. |
91cc996
to
bd10ff4
Compare
bd10ff4
to
cbbb5af
Compare
index = closeIndex; | ||
for (String inputLine; (inputLine = in.readLine()) != null;) { | ||
for (Matcher matcher = HREF.matcher(inputLine); matcher.find();) { | ||
URI href = URI.create(matcher.group(1).replace(" ", "%20")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @HannesWell. I misread your code during first review. We still need to trim the regex result here to deal with URIs starting/ending with blanks.
URI href = URI.create(matcher.group(1).replace(" ", "%20")); | |
URI href = URI.create(matcher.group(1).strip().replace(" ", "%20")); |
Thanks Michael for pointing this out, but unfortunately the help still uses html-4 as mentioned in #561 (comment). 😞 But I wonder why my changes in the Extension-Point schema are not picked up in an I-build when building the doc? Therefore I assumed the change fix is now included, but I still se it in my latest I-build SDK. |
I'm absolutely not an expert on those standards, but looking at the differences between 4 and 5, the href attribute has no relevant changes: https://www.w3.org/TR/html5-diff/#changed-attributes. Therefore URIs starting/ending with blanks should be valid there, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems my knowledge of the standard is not sufficient enough (given the arguments in the other thread), so I'm removing my veto.
cbbb5af
to
6c8adc9
Compare
Me neither. But in doubt, I would prefer to be stricter in this case, just to be sure. |
Test is green now. |
And investigate why the test is failing.
Fixes #561