[ 
https://issues.apache.org/jira/browse/SHINDIG-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728018#action_12728018
 ] 

Chris Chabot commented on SHINDIG-1103:
---------------------------------------

I've applied the patch, and the index change looks good, however the 
GadgetRewriterTest has some issues, when i run it as-is i get this error:

1) testRewrite(GadgetRewriterTest)
GadgetException: Invalid view specified for this gadget
/Library/WebServer/Documents/shindig/php/test/gadgets/GadgetRewriterTest.php:81
/Library/WebServer/Documents/shindig/php/test/index.php:53
/Library/WebServer/Documents/shindig/php/test/index.php:85

When I change the 'default' view to 'profile', I run into another error:

1) testRewrite(GadgetRewriterTest)
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ -1,2 +1,6 @@
+
+  
     <script>var test='<b>BIG WORDS</b>'</script>
-    <h1>Hello, world!</h1>
\ No newline at end of file
+    <h1>Hello, world!</h1>
+  
+  
\ No newline at end of file

/Library/WebServer/Documents/shindig/php/test/gadgets/GadgetRewriterTest.php:105
/Library/WebServer/Documents/shindig/php/test/index.php:53
/Library/WebServer/Documents/shindig/php/test/index.php:85


So I've committed the GadgetRewriterTest without the actual test part (so we 
don't get failing tests everywhere), Could you please submit a new patch for 
that bit?



> The bug is that DOMDocument->loadHtml will remove tages like </b> in script.
> ----------------------------------------------------------------------------
>
>                 Key: SHINDIG-1103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1103
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>    Affects Versions: trunk
>            Reporter: lipeng
>             Fix For: trunk
>
>         Attachments: index-rewriter-test.patch
>
>
> Fixed shindig/php/test/index.php, We can request 
> "http://shindig/test/index.php?test=GadgetRewriterTest"; to get 
> GadgetRewriterTest's result.
> Added shindig/php/test/gadgets/GadgetRewriterTest.php, To test when activate 
> rewriter by rewrite_by_default=true, the rewrite code should change content 
> within the content tag in application xml.
> <code>
> <Content type="html" view="default"> 
>     <script>var test='<b>BIG WORDS</b>'</script>
>     <h1>Hello, world!</h1>
> </Content>
> </code>
> be changed to
> <code>
>     <script>var test='<b>BIG WORDS'</script>
>     <h1>Hello, world!</h1>
> </code>
> The bug is that DOMDocument->loadHtml will remove tages like </b> in script. 
> Every loadHtml calling has that problem. Do you have any solution for this?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to