[jira] [Commented] (WICKET-6544) Chrome and Firefox on iOS detected as Safari version -1

2018-04-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426607#comment-16426607
 ] 

ASF GitHub Bot commented on WICKET-6544:


Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/269
  
I just tested a bit around and I would suggest the following changes:

* Drop the support for minor version in exchange for a full version String 
(11.0, 3.5.8, 4.0b4a)
* Change the implementation to yauaa - I also played around a bit and found 
some not correctly resolved version numbers (the browsers are all detected 
correctly) https://github.com/nielsbasjes/yauaa/issues/75
* Change the UserAgent enum to not handle excludes, but only browser names

If the issue is fixed I can provide a PR.


> Chrome and Firefox on iOS detected as Safari version -1
> ---
>
> Key: WICKET-6544
> URL: https://issues.apache.org/jira/browse/WICKET-6544
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.9.0
>Reporter: Sven Ackermann
>Assignee: Maxim Solodovnik
>Priority: Major
>
> The UserAgent detection on iOS for browsers other than Safari does not work 
> correctly.
> E.g. Chrome 64 has UserAgent
> ??Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) 
> AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/64.0.3282.112 Mobile/15D100 
> Safari/604.1??
> which is recognized by classes {{UserAgent}} and {{WebClientInfo}} as Safari 
> with no version (-1). The problem is that the UserAgent does not contain 
> "Chrome" as required by {{UserAgent.CHROME}}, but instead "CriOS". So it is 
> recognized as Safari, but since it does not contain "version/", no version is 
> set.
> A similar problem exists for Firefox on iOS where the UserAgent contains 
> "FxiOS" instead of "Firefox":
>  ??Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) 
> AppleWebKit/604.5.6 (KHTML, like Gecko) FxiOS/10.6b8836 Mobile/15D100 
> Safari/604.5.6??
> In our application this causes some unwanted redirects to legacy pages 
> because we think it is an old Safari browser with no support for some 
> features our pages need. But of course the Chrome und Firefox versions above 
> support all that.
> see also 
> [https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent|https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent,]
>  and 
> [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#Firefox_for_iOS]
>  
> Thanks for looking into it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6544) Chrome and Firefox on iOS detected as Safari version -1

2018-04-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426777#comment-16426777
 ] 

ASF GitHub Bot commented on WICKET-6544:


Github user svenmeier commented on the issue:

https://github.com/apache/wicket/pull/269
  
Guys I get it, there are many good solutions to choose from, but why should 
we make Wicket dependent on anyone of them?

https://github.com/nielsbasjes/yauaa looks good, but do users really need 
assistance for this?

`UserAgent  userAgent = analyzer.parse(new 
WebClientInfo(requestCycle).getUserAgent());`


> Chrome and Firefox on iOS detected as Safari version -1
> ---
>
> Key: WICKET-6544
> URL: https://issues.apache.org/jira/browse/WICKET-6544
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.9.0
>Reporter: Sven Ackermann
>Assignee: Maxim Solodovnik
>Priority: Major
>
> The UserAgent detection on iOS for browsers other than Safari does not work 
> correctly.
> E.g. Chrome 64 has UserAgent
> ??Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) 
> AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/64.0.3282.112 Mobile/15D100 
> Safari/604.1??
> which is recognized by classes {{UserAgent}} and {{WebClientInfo}} as Safari 
> with no version (-1). The problem is that the UserAgent does not contain 
> "Chrome" as required by {{UserAgent.CHROME}}, but instead "CriOS". So it is 
> recognized as Safari, but since it does not contain "version/", no version is 
> set.
> A similar problem exists for Firefox on iOS where the UserAgent contains 
> "FxiOS" instead of "Firefox":
>  ??Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) 
> AppleWebKit/604.5.6 (KHTML, like Gecko) FxiOS/10.6b8836 Mobile/15D100 
> Safari/604.5.6??
> In our application this causes some unwanted redirects to legacy pages 
> because we think it is an old Safari browser with no support for some 
> features our pages need. But of course the Chrome und Firefox versions above 
> support all that.
> see also 
> [https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent|https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent,]
>  and 
> [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#Firefox_for_iOS]
>  
> Thanks for looking into it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6544) Chrome and Firefox on iOS detected as Safari version -1

2018-04-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426818#comment-16426818
 ] 

ASF GitHub Bot commented on WICKET-6544:


Github user klopfdreh commented on the issue:

https://github.com/apache/wicket/pull/269
  
In my opinion and because of such a big pool of browsers I would say yes.


> Chrome and Firefox on iOS detected as Safari version -1
> ---
>
> Key: WICKET-6544
> URL: https://issues.apache.org/jira/browse/WICKET-6544
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 7.9.0
>Reporter: Sven Ackermann
>Assignee: Maxim Solodovnik
>Priority: Major
>
> The UserAgent detection on iOS for browsers other than Safari does not work 
> correctly.
> E.g. Chrome 64 has UserAgent
> ??Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) 
> AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/64.0.3282.112 Mobile/15D100 
> Safari/604.1??
> which is recognized by classes {{UserAgent}} and {{WebClientInfo}} as Safari 
> with no version (-1). The problem is that the UserAgent does not contain 
> "Chrome" as required by {{UserAgent.CHROME}}, but instead "CriOS". So it is 
> recognized as Safari, but since it does not contain "version/", no version is 
> set.
> A similar problem exists for Firefox on iOS where the UserAgent contains 
> "FxiOS" instead of "Firefox":
>  ??Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_6 like Mac OS X) 
> AppleWebKit/604.5.6 (KHTML, like Gecko) FxiOS/10.6b8836 Mobile/15D100 
> Safari/604.5.6??
> In our application this causes some unwanted redirects to legacy pages 
> because we think it is an old Safari browser with no support for some 
> features our pages need. But of course the Chrome und Firefox versions above 
> support all that.
> see also 
> [https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent|https://developer.chrome.com/multidevice/user-agent#chrome_for_ios_user_agent,]
>  and 
> [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#Firefox_for_iOS]
>  
> Thanks for looking into it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[wicket] Git Push Summary

2018-04-05 Thread solomax
Repository: wicket
Updated Branches:
  refs/heads/WICKET-6533-non-characters [deleted] b85f5c020


wicket git commit: [WICKET-6546] HTML comments are removed from inline CSS

2018-04-05 Thread solomax
Repository: wicket
Updated Branches:
  refs/heads/master 7aa7c64ef -> 976f28de7


[WICKET-6546] HTML comments are removed from inline CSS


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/976f28de
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/976f28de
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/976f28de

Branch: refs/heads/master
Commit: 976f28de7a890a5827ef8c160e74a40df2c87709
Parents: 7aa7c64
Author: Maxim Solodovnik 
Authored: Tue Apr 3 21:23:48 2018 +0700
Committer: Maxim Solodovnik 
Committed: Tue Apr 3 21:23:48 2018 +0700

--
 .../org/apache/wicket/core/util/string/CssUtils.java   | 13 -
 .../markup/html/internal/HeaderResponseTest.java   |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/976f28de/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
index 4013e83..b028b43 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
@@ -27,11 +27,14 @@ import org.apache.wicket.util.string.Strings;
  */
 public final class CssUtils
 {
+   /** start of CSS inline open tag */
+   public final static String INLINE_OPEN_TAG_START = "\n";
+   public final static String INLINE_CLOSE_TAG = "\n";
 
/**
 * Hidden constructor.
@@ -64,12 +67,12 @@ public final class CssUtils
 */
public static void writeOpenTag(final Response response, String id)
{
-   response.write("\n" +
+   String expected = "\n";
String actual = headerResponse.getResponse().toString();
Assert.assertEquals(expected, actual);



[jira] [Commented] (WICKET-6546) CssContentHeaderItem comments CSS code with HTML comments

2018-04-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427196#comment-16427196
 ] 

ASF GitHub Bot commented on WICKET-6546:


Github user asfgit closed the pull request at:

https://github.com/apache/wicket/pull/274


> CssContentHeaderItem comments CSS code with HTML comments
> -
>
> Key: WICKET-6546
> URL: https://issues.apache.org/jira/browse/WICKET-6546
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.24.0, 6.29.0
>Reporter: Robert Niestroj
>Assignee: Maxim Solodovnik
>Priority: Minor
> Attachments: wicket6546 (2).zip
>
>
> CssContentHeaderItem wraps the passed CSS in HTML comments thus rendering 
> invalid markup.
> Example code:
>  
> {code:java}
> @Override
> public void renderHead(Component component, IHeaderResponse response) {
>    super.renderHead(component, response);
>    response.render(CssContentHeaderItem.forCSS(".select2-container--open 
> {z-index: 10;}", "select2-mod", ""));
> }
> {code}
> Renders:
>  
> {code:java}
> 
> 
> {code}
> The HTML comments in the CSS make the response invalid and in the browser you 
> get a XML Parsing Error - Not Well Formed.
>  
> It should not render this invalid html comments in CSS.
> Looking at the source code i think the error is in the CssUtils class: 
> https://github.com/apache/wicket/blob/wicket-6.x/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WICKET-6546) CssContentHeaderItem comments CSS code with HTML comments

2018-04-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427195#comment-16427195
 ] 

ASF subversion and git services commented on WICKET-6546:
-

Commit 976f28de7a890a5827ef8c160e74a40df2c87709 in wicket's branch 
refs/heads/master from [~solomax]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=976f28d ]

[WICKET-6546] HTML comments are removed from inline CSS


> CssContentHeaderItem comments CSS code with HTML comments
> -
>
> Key: WICKET-6546
> URL: https://issues.apache.org/jira/browse/WICKET-6546
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.24.0, 6.29.0
>Reporter: Robert Niestroj
>Assignee: Maxim Solodovnik
>Priority: Minor
> Attachments: wicket6546 (2).zip
>
>
> CssContentHeaderItem wraps the passed CSS in HTML comments thus rendering 
> invalid markup.
> Example code:
>  
> {code:java}
> @Override
> public void renderHead(Component component, IHeaderResponse response) {
>    super.renderHead(component, response);
>    response.render(CssContentHeaderItem.forCSS(".select2-container--open 
> {z-index: 10;}", "select2-mod", ""));
> }
> {code}
> Renders:
>  
> {code:java}
> 
> 
> {code}
> The HTML comments in the CSS make the response invalid and in the browser you 
> get a XML Parsing Error - Not Well Formed.
>  
> It should not render this invalid html comments in CSS.
> Looking at the source code i think the error is in the CssUtils class: 
> https://github.com/apache/wicket/blob/wicket-6.x/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


wicket git commit: [WICKET-6546] HTML comments are removed from inline CSS

2018-04-05 Thread solomax
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x deb5b9679 -> ebc97e31d


[WICKET-6546] HTML comments are removed from inline CSS


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ebc97e31
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ebc97e31
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ebc97e31

Branch: refs/heads/wicket-7.x
Commit: ebc97e31d09dba1b5a1e01c730831a40405f3deb
Parents: deb5b96
Author: Maxim Solodovnik 
Authored: Tue Apr 3 21:23:48 2018 +0700
Committer: Maxim Solodovnik 
Committed: Thu Apr 5 23:23:31 2018 +0700

--
 .../org/apache/wicket/core/util/string/CssUtils.java   | 13 -
 .../markup/html/internal/HeaderResponseTest.java   |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/ebc97e31/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java 
b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
index 78f29af..4a51c94 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
@@ -27,11 +27,14 @@ import org.apache.wicket.util.string.Strings;
  */
 public final class CssUtils
 {
+   /** start of CSS inline open tag */
+   public final static String INLINE_OPEN_TAG_START = "\n";
+   public final static String INLINE_CLOSE_TAG = "\n";
 
/**
 * Hidden constructor.
@@ -64,12 +67,12 @@ public final class CssUtils
 */
public static void writeOpenTag(final Response response, String id)
{
-   response.write("\n" +
+   String expected = "\n";
String actual = headerResponse.getResponse().toString();
Assert.assertEquals(expected, actual);



[jira] [Commented] (WICKET-6546) CssContentHeaderItem comments CSS code with HTML comments

2018-04-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427202#comment-16427202
 ] 

ASF subversion and git services commented on WICKET-6546:
-

Commit ebc97e31d09dba1b5a1e01c730831a40405f3deb in wicket's branch 
refs/heads/wicket-7.x from [~solomax]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=ebc97e3 ]

[WICKET-6546] HTML comments are removed from inline CSS


> CssContentHeaderItem comments CSS code with HTML comments
> -
>
> Key: WICKET-6546
> URL: https://issues.apache.org/jira/browse/WICKET-6546
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.24.0, 6.29.0
>Reporter: Robert Niestroj
>Assignee: Maxim Solodovnik
>Priority: Minor
> Attachments: wicket6546 (2).zip
>
>
> CssContentHeaderItem wraps the passed CSS in HTML comments thus rendering 
> invalid markup.
> Example code:
>  
> {code:java}
> @Override
> public void renderHead(Component component, IHeaderResponse response) {
>    super.renderHead(component, response);
>    response.render(CssContentHeaderItem.forCSS(".select2-container--open 
> {z-index: 10;}", "select2-mod", ""));
> }
> {code}
> Renders:
>  
> {code:java}
> 
> 
> {code}
> The HTML comments in the CSS make the response invalid and in the browser you 
> get a XML Parsing Error - Not Well Formed.
>  
> It should not render this invalid html comments in CSS.
> Looking at the source code i think the error is in the CssUtils class: 
> https://github.com/apache/wicket/blob/wicket-6.x/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (WICKET-6546) CssContentHeaderItem comments CSS code with HTML comments

2018-04-05 Thread Maxim Solodovnik (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik resolved WICKET-6546.
--
   Resolution: Fixed
Fix Version/s: 7.11.0
   8.0.0

> CssContentHeaderItem comments CSS code with HTML comments
> -
>
> Key: WICKET-6546
> URL: https://issues.apache.org/jira/browse/WICKET-6546
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.24.0, 6.29.0
>Reporter: Robert Niestroj
>Assignee: Maxim Solodovnik
>Priority: Minor
> Fix For: 8.0.0, 7.11.0
>
> Attachments: wicket6546 (2).zip
>
>
> CssContentHeaderItem wraps the passed CSS in HTML comments thus rendering 
> invalid markup.
> Example code:
>  
> {code:java}
> @Override
> public void renderHead(Component component, IHeaderResponse response) {
>    super.renderHead(component, response);
>    response.render(CssContentHeaderItem.forCSS(".select2-container--open 
> {z-index: 10;}", "select2-mod", ""));
> }
> {code}
> Renders:
>  
> {code:java}
> 
> 
> {code}
> The HTML comments in the CSS make the response invalid and in the browser you 
> get a XML Parsing Error - Not Well Formed.
>  
> It should not render this invalid html comments in CSS.
> Looking at the source code i think the error is in the CssUtils class: 
> https://github.com/apache/wicket/blob/wicket-6.x/wicket-core/src/main/java/org/apache/wicket/core/util/string/CssUtils.java
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[wicket] Git Push Summary

2018-04-05 Thread solomax
Repository: wicket
Updated Branches:
  refs/heads/WICKET-6546-no-css-comments [deleted] 976f28de7