You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2017/05/26 08:13:05 UTC

[jira] [Commented] (SLING-6884) Sling Servlet get is lowering case html markup required by angular 2 binding

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

Robert Munteanu commented on SLING-6884:
----------------------------------------

Thanks for the report [~gustavo.doriguetto@gmail.com] . I deployed the servlet you pasted above in the latest Sling launchpad and I don't get the same response.

{noformat}$ curl http://localhost:8080/bin/test
<html>
<body>
<nav>
<a [routerLink]="['/Home']">Home</a>
</nav>
</body>
</html>{noformat}

There must be something else in your deployment affecting the result.

> Sling Servlet get is lowering case html markup required by angular 2 binding
> ----------------------------------------------------------------------------
>
>                 Key: SLING-6884
>                 URL: https://issues.apache.org/jira/browse/SLING-6884
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Get 2.1.14
>            Reporter: Gustavo Doriguetto
>
> Sling Servlet get is lowering case (parsing?) angular 2 bindings on response payload markup
> Sample code:
> @SlingServlet(paths = { "/bin/test" }, methods = { "GET" })
> public class SimpleServlet extends SlingSafeMethodsServlet {
>     @Override
>     protected void doGet(final SlingHttpServletRequest req,
>             final SlingHttpServletResponse resp) throws ServletException, IOException {
>         resp.setContentType("text/html");
>         PrintWriter out = resp.getWriter();
>         out.println("<html>");
>         out.println("<body>");
>         out.println("<nav>");
>         out.println("<a [routerLink]=\"['/Home']\">Home</a>");
>         out.println("</nav>");
>         out.println("</body>");
>         out.println("</html>");
>     }
> }
> The response payload:
> <html>
> <body>
> <nav>
> <a [routerlink]="['/Home']">Home</a>
> </nav>
> </body>
> </html>
> Please note the lower case "l" on "routerLink".
> I have the same results on: 
> - Chrome
> - FF
> - IE



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)