Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
How to use Iframe tag with full document string

I received a string response mixed with js code and html code from the server.

<script> do some with js code...</script>
<div>
  <h1>Page Title</h1>
</div>

I was worried about xss atack, so tried to render the code on the screen with iframe. However, when the file string was put in the srcdoc attribute of iframe, the script tag did not work.

I think this problem is because the srcdoc attribute parses only the html tag. Is there any other way to use the string script code with iframe?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!