javascript - How does hastebin/pastebin hide their tags? -


okay i'm working on hastebin/pastebin type application. need little tho. how can display raw paste pre tags hidden in source shown on elements in chrome? example if goto https://hastebin.com/raw/mikepucegu see raw. if view source shows text

" <?php hi ?> " 

okay question how can that? here image of elements http://prntscr.com/g06s9l doesnt show in source? i'm confused want this. heres got far::

<?php $con=mysqli_connect("localhost","root","","blazebin"); // check connection if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); }   $result = mysqli_query($con,"select * pastes id=".$_get['id'].""); while($row = mysqli_fetch_array($result)) { echo "<script>document.write('<pre>');".$row['paste']."</pre>"; } mysqli_close($con); ?> 

btw know snippet wont work acting weird when inputting code thingy. okay can tell me how can insert elements them hidden in source not in elements?

if deliver response content-type of text/plain, browser display plain text. in php, can calling:

header("content-type: text/plain"); 

you must make call before sending output. once you've done this, output displayed plain text -- html tags in output ignored.


(the html elements you're looking @ red herring! injected http spy browser extension.)


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -