Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-135464

<script>alert(123);</script> and "&" is missing in og:description tag

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: Master
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      2
    • Fix Priority:
      3
    • Sprint:
      LIMA |QA Sprint 11

      Description

      Test steps:'

      1. Enable feature about `Allow to mix text with mapping for meta tags`
      2. Add a new Display Page Templates(Display Page Name) with Document or Blogs
      3. Publish it
      4. Configure it and go to Open Graph or SEO
      5. Map Description with "description Text<script>alert(123);</script>
        document description ${description}"
      6. Add Display Page Content fragment into Display Page Template Name
      7. Publish the Display Page Template
      8. Add a new document with "<script>alert(123);</script>" in its description field
      9. Select Specific Display Page Templates: Display Page Name for it and publish it
      10. Login out
      11. Visit the document by Friendly URL

      Expected result: 
      Should show like this contains two "<script>alert(123);</script>"

      <meta property="og:description" content="description Text<script>alert(123);</script> 
      document description <script>alert(123);</script>">
      

      Current result: 
      For Documents and Blogs, no "<script>alert(123);</script>" is contained.

      <meta property="og:description" content="description Text 
      document description ">
      

      For Web contentl, only contains the "<script>alert(123);</script>" from the web content itself

      <meta property="og:description" content="description Text 
      document description <script>alert(123);</script>">
      

      NOTE: Same behavior with some HTML characters, like "&".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yvonne.han Yvonne Han
              Reporter:
              yvonne.han Yvonne Han
              Participants of an Issue:
              Recent user:
              Yvonne Han
              Engineering Assignee:
              Adolfo Pérez
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                10 weeks, 5 days ago

                  Packages

                  Version Package