문제

아래 코드 :

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:fb="http://www.facebook.com/2008/fbml"
      xml:lang="en" lang="en">
<head>
    <title>FB Test</title>  
</head>

<body>
    <a href="#" onclick="FB.Connect.inviteConnectUsers();">Test</a>
    <fb:serverfbml style="width: 350px;">  
        <script type="text/fbml">
            <fb:connect-form action="http://127.0.0.1/post_invite">     
            </fb:connect-form>
        </script>
    </fb:serverfbml>
</body>
</html>

다음 오류가 발생합니다.

   - Warning: Compilation failed
   - Warning: <class 'zope.tal.htmltalparser.NestingError'>: Open tags <html>, <body>, <fb:serverfbml>, <script> do not match close tag </fb:connect-form>, at line 16, column 4
PTRuntimeError: ['Compilation failed', u"<class 'zope.tal.htmltalparser.NestingError'>: Open tags <html>, <body>, <fb:serverfbml>, <script> do not match close tag </fb:connect-form>, at line 16, column 4"]

그러나 구조는 나에게 유효한 것 같습니다 ...

도움이 되었습니까?

해결책

당신은 a 안에 태그를 넣을 수 없습니다 <script> 태그와 엄격한 ZPT 파서는 이에 대해 불평하고 있습니다. tal : 컨텐츠 = "구조 문자열 :"구성 : "구조 :"과 같이 내용을 어떻게 든 탈출해야합니다.

<script type="text/fbml" tal:content="structure string:
    &lt;fb:connect-form action=&quot;http://127.0.0.1/post_invite&quot;&lt;         
    &gt;/fb:connect-form&lt;
"></script>

다른 팁

스크립트 태그는 내 지식에 XML을 포함해서는 안됩니다.

XML 주석에 내용을 동봉하고 그것이 작동하는지 확인할 수 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top