Why escape if the_content isnt?Should I escape wordpress functions like the_title, the_excerpt, the_contentWhy does WordPress change a file's permissions?Do we need to escape data that we receive from theme options?Why are xmlrpc.php and wp-cron.php being called so often?How to escape custom css?Why should I use the esc_url?Why does WordPress have more than one salt?Do you need to escape hard coded plain text?How to escape multiple attribute at once in WordPress?Do I need to escape get_the_post_thumbnail function?

What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?

Pulling the rope with one hand is as heavy as with two hands?

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

Pressure to defend the relevance of one's area of mathematics

Packing rectangles: Does rotation ever help?

Why are the 2nd/3rd singular forms of present of « potere » irregular?

Can my Warlock be invisible and attack with its familiar?

What are the spoon bit of a spoon and fork bit of a fork called?

You look catfish vs You look like a catfish

Nginx subdirectory wordpress wp-login redirects to 404 not found

Is creating your own "experiment" considered cheating during a physics exam?

Upright [...] in italics quotation

How to delegate to implementing class

Subtleties of choosing the sequence of tenses in Russian

Counterexample: a pair of linearly ordered sets that are isomorphic to subsets of the other, but not isomorphic between them

get exit status from system() call

Modify locally tikzset

A non-technological, repeating, visible object in the sky, holding its position in the sky for hours

Electric guitar: why such heavy pots?

Feels like I am getting dragged in office politics

What is the difference between `a[bc]d` (brackets) and `ab,cd` (braces)?

Can not tell colimits from limits

Were there two appearances of Stan Lee?

Lock in SQL Server and Oracle



Why escape if the_content isnt?


Should I escape wordpress functions like the_title, the_excerpt, the_contentWhy does WordPress change a file's permissions?Do we need to escape data that we receive from theme options?Why are xmlrpc.php and wp-cron.php being called so often?How to escape custom css?Why should I use the esc_url?Why does WordPress have more than one salt?Do you need to escape hard coded plain text?How to escape multiple attribute at once in WordPress?Do I need to escape get_the_post_thumbnail function?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7















The built in function the_content runs through several filters, but does not escape output. It would be difficult for it to do so, as HTML and even some scripts must be allowed through.



When outputting, the_content seems to run through these filters (as of 5.0):



add_filter( 'the_content', 'do_blocks', 9 );
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies', 20 );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
add_filter( 'the_content', 'wp_make_content_images_responsive' );

(and)

add_filter( 'the_content', 'capital_P_dangit' );
add_filter( 'the_content', 'do_shortcode' );


It also does a simple string replace:



$content = str_replace( ']]>', ']]>', $content );



And then get_the_content does a tiny bit of processing related to the "more" link and a bug with foreign languages.



None of those prevent XSS script injection, right?



When saving, the data is sanitized through wp_kses_post. But as this is an expensive process, I understand why it's not used on output.



The rule of thumb for WordPress escaping is that everything needs to be escaped, regardless of input sanitation, and as lately as possible. I've read several articles saying this, because the database is not to be considered a trusted source.



But for the reasons above, the_content doesn't follow that. Nor do the core themes (i.e. TwentyNineteen) add additional escaping on output.



So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?










share|improve this question
























  • You forgot wp_kses_post

    – Tom J Nowell
    Mar 27 at 15:20











  • It runs through wp_kses_post on output? Where?

    – tmdesigned
    Mar 27 at 15:38

















7















The built in function the_content runs through several filters, but does not escape output. It would be difficult for it to do so, as HTML and even some scripts must be allowed through.



When outputting, the_content seems to run through these filters (as of 5.0):



add_filter( 'the_content', 'do_blocks', 9 );
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies', 20 );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
add_filter( 'the_content', 'wp_make_content_images_responsive' );

(and)

add_filter( 'the_content', 'capital_P_dangit' );
add_filter( 'the_content', 'do_shortcode' );


It also does a simple string replace:



$content = str_replace( ']]>', ']]>', $content );



And then get_the_content does a tiny bit of processing related to the "more" link and a bug with foreign languages.



None of those prevent XSS script injection, right?



When saving, the data is sanitized through wp_kses_post. But as this is an expensive process, I understand why it's not used on output.



The rule of thumb for WordPress escaping is that everything needs to be escaped, regardless of input sanitation, and as lately as possible. I've read several articles saying this, because the database is not to be considered a trusted source.



But for the reasons above, the_content doesn't follow that. Nor do the core themes (i.e. TwentyNineteen) add additional escaping on output.



So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?










share|improve this question
























  • You forgot wp_kses_post

    – Tom J Nowell
    Mar 27 at 15:20











  • It runs through wp_kses_post on output? Where?

    – tmdesigned
    Mar 27 at 15:38













7












7








7


3






The built in function the_content runs through several filters, but does not escape output. It would be difficult for it to do so, as HTML and even some scripts must be allowed through.



When outputting, the_content seems to run through these filters (as of 5.0):



add_filter( 'the_content', 'do_blocks', 9 );
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies', 20 );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
add_filter( 'the_content', 'wp_make_content_images_responsive' );

(and)

add_filter( 'the_content', 'capital_P_dangit' );
add_filter( 'the_content', 'do_shortcode' );


It also does a simple string replace:



$content = str_replace( ']]>', ']]>', $content );



And then get_the_content does a tiny bit of processing related to the "more" link and a bug with foreign languages.



None of those prevent XSS script injection, right?



When saving, the data is sanitized through wp_kses_post. But as this is an expensive process, I understand why it's not used on output.



The rule of thumb for WordPress escaping is that everything needs to be escaped, regardless of input sanitation, and as lately as possible. I've read several articles saying this, because the database is not to be considered a trusted source.



But for the reasons above, the_content doesn't follow that. Nor do the core themes (i.e. TwentyNineteen) add additional escaping on output.



So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?










share|improve this question
















The built in function the_content runs through several filters, but does not escape output. It would be difficult for it to do so, as HTML and even some scripts must be allowed through.



When outputting, the_content seems to run through these filters (as of 5.0):



add_filter( 'the_content', 'do_blocks', 9 );
add_filter( 'the_content', 'wptexturize' );
add_filter( 'the_content', 'convert_smilies', 20 );
add_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'shortcode_unautop' );
add_filter( 'the_content', 'prepend_attachment' );
add_filter( 'the_content', 'wp_make_content_images_responsive' );

(and)

add_filter( 'the_content', 'capital_P_dangit' );
add_filter( 'the_content', 'do_shortcode' );


It also does a simple string replace:



$content = str_replace( ']]>', ']]>', $content );



And then get_the_content does a tiny bit of processing related to the "more" link and a bug with foreign languages.



None of those prevent XSS script injection, right?



When saving, the data is sanitized through wp_kses_post. But as this is an expensive process, I understand why it's not used on output.



The rule of thumb for WordPress escaping is that everything needs to be escaped, regardless of input sanitation, and as lately as possible. I've read several articles saying this, because the database is not to be considered a trusted source.



But for the reasons above, the_content doesn't follow that. Nor do the core themes (i.e. TwentyNineteen) add additional escaping on output.



So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?







security






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 12:50







tmdesigned

















asked Mar 27 at 12:44









tmdesignedtmdesigned

1,37911014




1,37911014












  • You forgot wp_kses_post

    – Tom J Nowell
    Mar 27 at 15:20











  • It runs through wp_kses_post on output? Where?

    – tmdesigned
    Mar 27 at 15:38

















  • You forgot wp_kses_post

    – Tom J Nowell
    Mar 27 at 15:20











  • It runs through wp_kses_post on output? Where?

    – tmdesigned
    Mar 27 at 15:38
















You forgot wp_kses_post

– Tom J Nowell
Mar 27 at 15:20





You forgot wp_kses_post

– Tom J Nowell
Mar 27 at 15:20













It runs through wp_kses_post on output? Where?

– tmdesigned
Mar 27 at 15:38





It runs through wp_kses_post on output? Where?

– tmdesigned
Mar 27 at 15:38










4 Answers
4






active

oldest

votes


















8















If I were a hacker with access to the database, wouldn't I just add my
code to a post's content?




If you've got access to the database, chances are that you've got enough access that escaping isn't going to stop you. Escaping is not going to help you if you've been hacked. It's not supposed to. There's other reasons to escape. The two main ones that I can think of are:



To deal with unsanitized input



WordPress post content is sanitized when it's saved, but not everything else is. Content passed via a query string in the URL isn't sanitized, for example. Neither is content in translation files, necessarily. Both those are sources of content that have nothing to do with the site being compromised. So translatable text and content pulled from the URL need to be escaped.



To prevent users accidentally breaking markup



Escaping isn't just for security. You also need it to prevent users accidentally breaking their site's markup. For example, if the user placing quotes or > symbols in some content in your plugin would break the markup, then you should escape that output. You don't want to be over-aggressive in sanitising on input, because there's perfectly valid reasons a user might want to use those characters.





“Escaping isn’t only about protecting from bad guys. It’s just making
our software durable. Against random bad input, against malicious
input, or against bad weather.”




That's from the WordPress VIP guidelines on escaping. It has a lot more to say on this matter, and you should give it a read.






share|improve this answer























  • Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

    – tmdesigned
    Mar 27 at 13:22


















6














I'm actually an engineer at VIP who does a lot of code review :) I flag a lot of missing escaping.




but does not escape output




Not quite, it doesn't escape on output, which is surprising to most people. This is because if you're a super admin you have the unfiltered_html capability, so it can't escape on output. Instead it runs it through wp_kses_post on input. Ideally you would remove that capability though.



Here is the implementation at the current time:



function the_content( $more_link_text = null, $strip_teaser = false ) 
$content = get_the_content( $more_link_text, $strip_teaser );

/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]>', $content );
echo $content;



The ideal mechanism for escaping anything that goes through the_content filter on the other hand is:



echo apply_filters( 'the_content', wp_kses_post( $content ) );


This way we make the content safe, then run it through the filter, avoiding the embeds etc being stripped out.



So Why Escape




The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



To prevent users accidentally breaking markup




There are many reasons to escape, but fundamentally, you're enforcing expectations. Take the following code:



<a href="<?=$url?>">


We expect $url to contain a URL suitable for a href attribute, but what if it isn't? Well why leave it to chance, lets enforce it:



<a href="<?=esc_url( $url )?>">


It is now always going to be a URL. It doesn't matter if a hacker puts an image in $url, or if a user types in the wrong field, or there's a malicious script. It will always be a valid URL because we said it's going to be a URL. Sure it might be a very strange URL, but it will always meet the expectation that a URL will be there. This is very handy, be it for markup validation, for security, etc



Having said that, escaping is not validation, escaping is not sanitisation. Those are separate steps that happen at different points in the life cycle. Escaping forces things to meet expectations, even if it mangles them to do so.



Sometimes I like to think of escaping as one of those Japanese gameshows with the giant foam wall with the cut out. Contestants have to fit in the dog shape or they get discarded, only for our purposes there are lasers and knives around the hole. Whatever is left at the end will be dog shaped, and it will be unforgiving and strict if you're not already dog shaped.



Remember:



  • sanitise early

  • validate early

  • escape late

  • escape often

Security is a multiple step, multiple layer onion of defences, escaping is one of the outer layers of defence on output. It can mangle attack code on a compromised site rendering it useless, thwart open exploits, and make sure your client doesn't break a site by putting tags in a field they shouldn't. It's not a substitute for the other things, and it's by far and away the most underused security tool in a developers handbook.



As for why to escape if the_content doesn't? If you have a flood coming, and 5 holes in a wall, but only time to fix 3, do you shrug and fix none? Or do you mitigate the risk and reduce the attack area?



Perhaps I can help fix those final 2 holes with this snippet:



add_filter( 'the_content' function( $content ) 
return wp_kses_post( $content );
, PHP_INT_MAX + 1 );


Here we set the priority to the highest possible number in PHP, then add 1 so it overflows to the lowest possible number that can be represented. This way all calls to the_content will escape the value prior to any other filters. This way embeds etc still work, but users can't sneak in dangerous HTML via the database. Additionally, look into removing the unfiltered_html capability from all roles






share|improve this answer


















  • 1





    Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

    – tmdesigned
    Mar 27 at 16:30



















3














The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



The filters applied on the content, generate a valid HTML from something that is a mix of HTML and some other text which have some other syntax like shortcodes. The fact that some of the content is already valid HTML prevents applying escaping on all of it.



As for kses related functions, you can not apply them mainly because you do not have enough context to know which one to use. For example, there might be some process which uses the the_content filter to add JS to the post content therefor core can not guess based on things like the post author if the JS is legit or not.




So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




Again, escaping is for generating valid HTML. From a security POV it is not that escaping provides security but that a code which lucks escaping should be suspicious as it might be easier to exploit.
For example, the way core uses _e and '__` for translations means that anyone that can convince you to install a non-official translation might be able to add hard to detect JS in the translation file and hack your site.
This is a good example of "do what I say and not what I do".






share|improve this answer























  • Thanks, Mark, for the additional perspective.

    – tmdesigned
    Mar 27 at 17:13


















2















If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




I think your question answers itself. If you were a hacker with access to the db, then you've already gained the access you require. Escaping output doesn't change that at all.



The reason for escaping output is evaluating untrusted data to avoid the hacker gaining that access in the first place.






share|improve this answer























  • Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

    – tmdesigned
    Mar 27 at 13:24











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "110"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f332740%2fwhy-escape-if-the-content-isnt%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























4 Answers
4






active

oldest

votes








4 Answers
4






active

oldest

votes









active

oldest

votes






active

oldest

votes









8















If I were a hacker with access to the database, wouldn't I just add my
code to a post's content?




If you've got access to the database, chances are that you've got enough access that escaping isn't going to stop you. Escaping is not going to help you if you've been hacked. It's not supposed to. There's other reasons to escape. The two main ones that I can think of are:



To deal with unsanitized input



WordPress post content is sanitized when it's saved, but not everything else is. Content passed via a query string in the URL isn't sanitized, for example. Neither is content in translation files, necessarily. Both those are sources of content that have nothing to do with the site being compromised. So translatable text and content pulled from the URL need to be escaped.



To prevent users accidentally breaking markup



Escaping isn't just for security. You also need it to prevent users accidentally breaking their site's markup. For example, if the user placing quotes or > symbols in some content in your plugin would break the markup, then you should escape that output. You don't want to be over-aggressive in sanitising on input, because there's perfectly valid reasons a user might want to use those characters.





“Escaping isn’t only about protecting from bad guys. It’s just making
our software durable. Against random bad input, against malicious
input, or against bad weather.”




That's from the WordPress VIP guidelines on escaping. It has a lot more to say on this matter, and you should give it a read.






share|improve this answer























  • Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

    – tmdesigned
    Mar 27 at 13:22















8















If I were a hacker with access to the database, wouldn't I just add my
code to a post's content?




If you've got access to the database, chances are that you've got enough access that escaping isn't going to stop you. Escaping is not going to help you if you've been hacked. It's not supposed to. There's other reasons to escape. The two main ones that I can think of are:



To deal with unsanitized input



WordPress post content is sanitized when it's saved, but not everything else is. Content passed via a query string in the URL isn't sanitized, for example. Neither is content in translation files, necessarily. Both those are sources of content that have nothing to do with the site being compromised. So translatable text and content pulled from the URL need to be escaped.



To prevent users accidentally breaking markup



Escaping isn't just for security. You also need it to prevent users accidentally breaking their site's markup. For example, if the user placing quotes or > symbols in some content in your plugin would break the markup, then you should escape that output. You don't want to be over-aggressive in sanitising on input, because there's perfectly valid reasons a user might want to use those characters.





“Escaping isn’t only about protecting from bad guys. It’s just making
our software durable. Against random bad input, against malicious
input, or against bad weather.”




That's from the WordPress VIP guidelines on escaping. It has a lot more to say on this matter, and you should give it a read.






share|improve this answer























  • Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

    – tmdesigned
    Mar 27 at 13:22













8












8








8








If I were a hacker with access to the database, wouldn't I just add my
code to a post's content?




If you've got access to the database, chances are that you've got enough access that escaping isn't going to stop you. Escaping is not going to help you if you've been hacked. It's not supposed to. There's other reasons to escape. The two main ones that I can think of are:



To deal with unsanitized input



WordPress post content is sanitized when it's saved, but not everything else is. Content passed via a query string in the URL isn't sanitized, for example. Neither is content in translation files, necessarily. Both those are sources of content that have nothing to do with the site being compromised. So translatable text and content pulled from the URL need to be escaped.



To prevent users accidentally breaking markup



Escaping isn't just for security. You also need it to prevent users accidentally breaking their site's markup. For example, if the user placing quotes or > symbols in some content in your plugin would break the markup, then you should escape that output. You don't want to be over-aggressive in sanitising on input, because there's perfectly valid reasons a user might want to use those characters.





“Escaping isn’t only about protecting from bad guys. It’s just making
our software durable. Against random bad input, against malicious
input, or against bad weather.”




That's from the WordPress VIP guidelines on escaping. It has a lot more to say on this matter, and you should give it a read.






share|improve this answer














If I were a hacker with access to the database, wouldn't I just add my
code to a post's content?




If you've got access to the database, chances are that you've got enough access that escaping isn't going to stop you. Escaping is not going to help you if you've been hacked. It's not supposed to. There's other reasons to escape. The two main ones that I can think of are:



To deal with unsanitized input



WordPress post content is sanitized when it's saved, but not everything else is. Content passed via a query string in the URL isn't sanitized, for example. Neither is content in translation files, necessarily. Both those are sources of content that have nothing to do with the site being compromised. So translatable text and content pulled from the URL need to be escaped.



To prevent users accidentally breaking markup



Escaping isn't just for security. You also need it to prevent users accidentally breaking their site's markup. For example, if the user placing quotes or > symbols in some content in your plugin would break the markup, then you should escape that output. You don't want to be over-aggressive in sanitising on input, because there's perfectly valid reasons a user might want to use those characters.





“Escaping isn’t only about protecting from bad guys. It’s just making
our software durable. Against random bad input, against malicious
input, or against bad weather.”




That's from the WordPress VIP guidelines on escaping. It has a lot more to say on this matter, and you should give it a read.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 13:09









Jacob PeattieJacob Peattie

18.2k42233




18.2k42233












  • Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

    – tmdesigned
    Mar 27 at 13:22

















  • Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

    – tmdesigned
    Mar 27 at 13:22
















Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

– tmdesigned
Mar 27 at 13:22





Thank you, that is helpful. I had read a post on VIP about escaping and the author specifically mentioned the idea of someone having gained access to the DB but not the server. However I think your reasoning on that point makes more sense. And, I suppose, sometimes you are escaping vulnerable content from the database even without someone having had complete access to the database, i.e. via a plugin or even just a comment.

– tmdesigned
Mar 27 at 13:22













6














I'm actually an engineer at VIP who does a lot of code review :) I flag a lot of missing escaping.




but does not escape output




Not quite, it doesn't escape on output, which is surprising to most people. This is because if you're a super admin you have the unfiltered_html capability, so it can't escape on output. Instead it runs it through wp_kses_post on input. Ideally you would remove that capability though.



Here is the implementation at the current time:



function the_content( $more_link_text = null, $strip_teaser = false ) 
$content = get_the_content( $more_link_text, $strip_teaser );

/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]&gt;', $content );
echo $content;



The ideal mechanism for escaping anything that goes through the_content filter on the other hand is:



echo apply_filters( 'the_content', wp_kses_post( $content ) );


This way we make the content safe, then run it through the filter, avoiding the embeds etc being stripped out.



So Why Escape




The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



To prevent users accidentally breaking markup




There are many reasons to escape, but fundamentally, you're enforcing expectations. Take the following code:



<a href="<?=$url?>">


We expect $url to contain a URL suitable for a href attribute, but what if it isn't? Well why leave it to chance, lets enforce it:



<a href="<?=esc_url( $url )?>">


It is now always going to be a URL. It doesn't matter if a hacker puts an image in $url, or if a user types in the wrong field, or there's a malicious script. It will always be a valid URL because we said it's going to be a URL. Sure it might be a very strange URL, but it will always meet the expectation that a URL will be there. This is very handy, be it for markup validation, for security, etc



Having said that, escaping is not validation, escaping is not sanitisation. Those are separate steps that happen at different points in the life cycle. Escaping forces things to meet expectations, even if it mangles them to do so.



Sometimes I like to think of escaping as one of those Japanese gameshows with the giant foam wall with the cut out. Contestants have to fit in the dog shape or they get discarded, only for our purposes there are lasers and knives around the hole. Whatever is left at the end will be dog shaped, and it will be unforgiving and strict if you're not already dog shaped.



Remember:



  • sanitise early

  • validate early

  • escape late

  • escape often

Security is a multiple step, multiple layer onion of defences, escaping is one of the outer layers of defence on output. It can mangle attack code on a compromised site rendering it useless, thwart open exploits, and make sure your client doesn't break a site by putting tags in a field they shouldn't. It's not a substitute for the other things, and it's by far and away the most underused security tool in a developers handbook.



As for why to escape if the_content doesn't? If you have a flood coming, and 5 holes in a wall, but only time to fix 3, do you shrug and fix none? Or do you mitigate the risk and reduce the attack area?



Perhaps I can help fix those final 2 holes with this snippet:



add_filter( 'the_content' function( $content ) 
return wp_kses_post( $content );
, PHP_INT_MAX + 1 );


Here we set the priority to the highest possible number in PHP, then add 1 so it overflows to the lowest possible number that can be represented. This way all calls to the_content will escape the value prior to any other filters. This way embeds etc still work, but users can't sneak in dangerous HTML via the database. Additionally, look into removing the unfiltered_html capability from all roles






share|improve this answer


















  • 1





    Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

    – tmdesigned
    Mar 27 at 16:30
















6














I'm actually an engineer at VIP who does a lot of code review :) I flag a lot of missing escaping.




but does not escape output




Not quite, it doesn't escape on output, which is surprising to most people. This is because if you're a super admin you have the unfiltered_html capability, so it can't escape on output. Instead it runs it through wp_kses_post on input. Ideally you would remove that capability though.



Here is the implementation at the current time:



function the_content( $more_link_text = null, $strip_teaser = false ) 
$content = get_the_content( $more_link_text, $strip_teaser );

/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]&gt;', $content );
echo $content;



The ideal mechanism for escaping anything that goes through the_content filter on the other hand is:



echo apply_filters( 'the_content', wp_kses_post( $content ) );


This way we make the content safe, then run it through the filter, avoiding the embeds etc being stripped out.



So Why Escape




The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



To prevent users accidentally breaking markup




There are many reasons to escape, but fundamentally, you're enforcing expectations. Take the following code:



<a href="<?=$url?>">


We expect $url to contain a URL suitable for a href attribute, but what if it isn't? Well why leave it to chance, lets enforce it:



<a href="<?=esc_url( $url )?>">


It is now always going to be a URL. It doesn't matter if a hacker puts an image in $url, or if a user types in the wrong field, or there's a malicious script. It will always be a valid URL because we said it's going to be a URL. Sure it might be a very strange URL, but it will always meet the expectation that a URL will be there. This is very handy, be it for markup validation, for security, etc



Having said that, escaping is not validation, escaping is not sanitisation. Those are separate steps that happen at different points in the life cycle. Escaping forces things to meet expectations, even if it mangles them to do so.



Sometimes I like to think of escaping as one of those Japanese gameshows with the giant foam wall with the cut out. Contestants have to fit in the dog shape or they get discarded, only for our purposes there are lasers and knives around the hole. Whatever is left at the end will be dog shaped, and it will be unforgiving and strict if you're not already dog shaped.



Remember:



  • sanitise early

  • validate early

  • escape late

  • escape often

Security is a multiple step, multiple layer onion of defences, escaping is one of the outer layers of defence on output. It can mangle attack code on a compromised site rendering it useless, thwart open exploits, and make sure your client doesn't break a site by putting tags in a field they shouldn't. It's not a substitute for the other things, and it's by far and away the most underused security tool in a developers handbook.



As for why to escape if the_content doesn't? If you have a flood coming, and 5 holes in a wall, but only time to fix 3, do you shrug and fix none? Or do you mitigate the risk and reduce the attack area?



Perhaps I can help fix those final 2 holes with this snippet:



add_filter( 'the_content' function( $content ) 
return wp_kses_post( $content );
, PHP_INT_MAX + 1 );


Here we set the priority to the highest possible number in PHP, then add 1 so it overflows to the lowest possible number that can be represented. This way all calls to the_content will escape the value prior to any other filters. This way embeds etc still work, but users can't sneak in dangerous HTML via the database. Additionally, look into removing the unfiltered_html capability from all roles






share|improve this answer


















  • 1





    Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

    – tmdesigned
    Mar 27 at 16:30














6












6








6







I'm actually an engineer at VIP who does a lot of code review :) I flag a lot of missing escaping.




but does not escape output




Not quite, it doesn't escape on output, which is surprising to most people. This is because if you're a super admin you have the unfiltered_html capability, so it can't escape on output. Instead it runs it through wp_kses_post on input. Ideally you would remove that capability though.



Here is the implementation at the current time:



function the_content( $more_link_text = null, $strip_teaser = false ) 
$content = get_the_content( $more_link_text, $strip_teaser );

/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]&gt;', $content );
echo $content;



The ideal mechanism for escaping anything that goes through the_content filter on the other hand is:



echo apply_filters( 'the_content', wp_kses_post( $content ) );


This way we make the content safe, then run it through the filter, avoiding the embeds etc being stripped out.



So Why Escape




The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



To prevent users accidentally breaking markup




There are many reasons to escape, but fundamentally, you're enforcing expectations. Take the following code:



<a href="<?=$url?>">


We expect $url to contain a URL suitable for a href attribute, but what if it isn't? Well why leave it to chance, lets enforce it:



<a href="<?=esc_url( $url )?>">


It is now always going to be a URL. It doesn't matter if a hacker puts an image in $url, or if a user types in the wrong field, or there's a malicious script. It will always be a valid URL because we said it's going to be a URL. Sure it might be a very strange URL, but it will always meet the expectation that a URL will be there. This is very handy, be it for markup validation, for security, etc



Having said that, escaping is not validation, escaping is not sanitisation. Those are separate steps that happen at different points in the life cycle. Escaping forces things to meet expectations, even if it mangles them to do so.



Sometimes I like to think of escaping as one of those Japanese gameshows with the giant foam wall with the cut out. Contestants have to fit in the dog shape or they get discarded, only for our purposes there are lasers and knives around the hole. Whatever is left at the end will be dog shaped, and it will be unforgiving and strict if you're not already dog shaped.



Remember:



  • sanitise early

  • validate early

  • escape late

  • escape often

Security is a multiple step, multiple layer onion of defences, escaping is one of the outer layers of defence on output. It can mangle attack code on a compromised site rendering it useless, thwart open exploits, and make sure your client doesn't break a site by putting tags in a field they shouldn't. It's not a substitute for the other things, and it's by far and away the most underused security tool in a developers handbook.



As for why to escape if the_content doesn't? If you have a flood coming, and 5 holes in a wall, but only time to fix 3, do you shrug and fix none? Or do you mitigate the risk and reduce the attack area?



Perhaps I can help fix those final 2 holes with this snippet:



add_filter( 'the_content' function( $content ) 
return wp_kses_post( $content );
, PHP_INT_MAX + 1 );


Here we set the priority to the highest possible number in PHP, then add 1 so it overflows to the lowest possible number that can be represented. This way all calls to the_content will escape the value prior to any other filters. This way embeds etc still work, but users can't sneak in dangerous HTML via the database. Additionally, look into removing the unfiltered_html capability from all roles






share|improve this answer













I'm actually an engineer at VIP who does a lot of code review :) I flag a lot of missing escaping.




but does not escape output




Not quite, it doesn't escape on output, which is surprising to most people. This is because if you're a super admin you have the unfiltered_html capability, so it can't escape on output. Instead it runs it through wp_kses_post on input. Ideally you would remove that capability though.



Here is the implementation at the current time:



function the_content( $more_link_text = null, $strip_teaser = false ) 
$content = get_the_content( $more_link_text, $strip_teaser );

/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]&gt;', $content );
echo $content;



The ideal mechanism for escaping anything that goes through the_content filter on the other hand is:



echo apply_filters( 'the_content', wp_kses_post( $content ) );


This way we make the content safe, then run it through the filter, avoiding the embeds etc being stripped out.



So Why Escape




The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



To prevent users accidentally breaking markup




There are many reasons to escape, but fundamentally, you're enforcing expectations. Take the following code:



<a href="<?=$url?>">


We expect $url to contain a URL suitable for a href attribute, but what if it isn't? Well why leave it to chance, lets enforce it:



<a href="<?=esc_url( $url )?>">


It is now always going to be a URL. It doesn't matter if a hacker puts an image in $url, or if a user types in the wrong field, or there's a malicious script. It will always be a valid URL because we said it's going to be a URL. Sure it might be a very strange URL, but it will always meet the expectation that a URL will be there. This is very handy, be it for markup validation, for security, etc



Having said that, escaping is not validation, escaping is not sanitisation. Those are separate steps that happen at different points in the life cycle. Escaping forces things to meet expectations, even if it mangles them to do so.



Sometimes I like to think of escaping as one of those Japanese gameshows with the giant foam wall with the cut out. Contestants have to fit in the dog shape or they get discarded, only for our purposes there are lasers and knives around the hole. Whatever is left at the end will be dog shaped, and it will be unforgiving and strict if you're not already dog shaped.



Remember:



  • sanitise early

  • validate early

  • escape late

  • escape often

Security is a multiple step, multiple layer onion of defences, escaping is one of the outer layers of defence on output. It can mangle attack code on a compromised site rendering it useless, thwart open exploits, and make sure your client doesn't break a site by putting tags in a field they shouldn't. It's not a substitute for the other things, and it's by far and away the most underused security tool in a developers handbook.



As for why to escape if the_content doesn't? If you have a flood coming, and 5 holes in a wall, but only time to fix 3, do you shrug and fix none? Or do you mitigate the risk and reduce the attack area?



Perhaps I can help fix those final 2 holes with this snippet:



add_filter( 'the_content' function( $content ) 
return wp_kses_post( $content );
, PHP_INT_MAX + 1 );


Here we set the priority to the highest possible number in PHP, then add 1 so it overflows to the lowest possible number that can be represented. This way all calls to the_content will escape the value prior to any other filters. This way embeds etc still work, but users can't sneak in dangerous HTML via the database. Additionally, look into removing the unfiltered_html capability from all roles







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 15:46









Tom J NowellTom J Nowell

33.5k44899




33.5k44899







  • 1





    Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

    – tmdesigned
    Mar 27 at 16:30













  • 1





    Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

    – tmdesigned
    Mar 27 at 16:30








1




1





Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

– tmdesigned
Mar 27 at 16:30






Thanks for the additional perspective. I had actually read your post on this subject on your site and had been wondering if you'd have anything to add.

– tmdesigned
Mar 27 at 16:30












3














The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



The filters applied on the content, generate a valid HTML from something that is a mix of HTML and some other text which have some other syntax like shortcodes. The fact that some of the content is already valid HTML prevents applying escaping on all of it.



As for kses related functions, you can not apply them mainly because you do not have enough context to know which one to use. For example, there might be some process which uses the the_content filter to add JS to the post content therefor core can not guess based on things like the post author if the JS is legit or not.




So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




Again, escaping is for generating valid HTML. From a security POV it is not that escaping provides security but that a code which lucks escaping should be suspicious as it might be easier to exploit.
For example, the way core uses _e and '__` for translations means that anyone that can convince you to install a non-official translation might be able to add hard to detect JS in the translation file and hack your site.
This is a good example of "do what I say and not what I do".






share|improve this answer























  • Thanks, Mark, for the additional perspective.

    – tmdesigned
    Mar 27 at 17:13















3














The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



The filters applied on the content, generate a valid HTML from something that is a mix of HTML and some other text which have some other syntax like shortcodes. The fact that some of the content is already valid HTML prevents applying escaping on all of it.



As for kses related functions, you can not apply them mainly because you do not have enough context to know which one to use. For example, there might be some process which uses the the_content filter to add JS to the post content therefor core can not guess based on things like the post author if the JS is legit or not.




So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




Again, escaping is for generating valid HTML. From a security POV it is not that escaping provides security but that a code which lucks escaping should be suspicious as it might be easier to exploit.
For example, the way core uses _e and '__` for translations means that anyone that can convince you to install a non-official translation might be able to add hard to detect JS in the translation file and hack your site.
This is a good example of "do what I say and not what I do".






share|improve this answer























  • Thanks, Mark, for the additional perspective.

    – tmdesigned
    Mar 27 at 17:13













3












3








3







The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



The filters applied on the content, generate a valid HTML from something that is a mix of HTML and some other text which have some other syntax like shortcodes. The fact that some of the content is already valid HTML prevents applying escaping on all of it.



As for kses related functions, you can not apply them mainly because you do not have enough context to know which one to use. For example, there might be some process which uses the the_content filter to add JS to the post content therefor core can not guess based on things like the post author if the JS is legit or not.




So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




Again, escaping is for generating valid HTML. From a security POV it is not that escaping provides security but that a code which lucks escaping should be suspicious as it might be easier to exploit.
For example, the way core uses _e and '__` for translations means that anyone that can convince you to install a non-official translation might be able to add hard to detect JS in the translation file and hack your site.
This is a good example of "do what I say and not what I do".






share|improve this answer













The point of escaping is to generate valid HTML, the added security it provides is just a nice side effect.



The filters applied on the content, generate a valid HTML from something that is a mix of HTML and some other text which have some other syntax like shortcodes. The fact that some of the content is already valid HTML prevents applying escaping on all of it.



As for kses related functions, you can not apply them mainly because you do not have enough context to know which one to use. For example, there might be some process which uses the the_content filter to add JS to the post content therefor core can not guess based on things like the post author if the JS is legit or not.




So...why is it helping anything to escape elsewhere? If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




Again, escaping is for generating valid HTML. From a security POV it is not that escaping provides security but that a code which lucks escaping should be suspicious as it might be easier to exploit.
For example, the way core uses _e and '__` for translations means that anyone that can convince you to install a non-official translation might be able to add hard to detect JS in the translation file and hack your site.
This is a good example of "do what I say and not what I do".







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 13:30









Mark KaplunMark Kaplun

20.5k52957




20.5k52957












  • Thanks, Mark, for the additional perspective.

    – tmdesigned
    Mar 27 at 17:13

















  • Thanks, Mark, for the additional perspective.

    – tmdesigned
    Mar 27 at 17:13
















Thanks, Mark, for the additional perspective.

– tmdesigned
Mar 27 at 17:13





Thanks, Mark, for the additional perspective.

– tmdesigned
Mar 27 at 17:13











2















If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




I think your question answers itself. If you were a hacker with access to the db, then you've already gained the access you require. Escaping output doesn't change that at all.



The reason for escaping output is evaluating untrusted data to avoid the hacker gaining that access in the first place.






share|improve this answer























  • Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

    – tmdesigned
    Mar 27 at 13:24















2















If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




I think your question answers itself. If you were a hacker with access to the db, then you've already gained the access you require. Escaping output doesn't change that at all.



The reason for escaping output is evaluating untrusted data to avoid the hacker gaining that access in the first place.






share|improve this answer























  • Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

    – tmdesigned
    Mar 27 at 13:24













2












2








2








If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




I think your question answers itself. If you were a hacker with access to the db, then you've already gained the access you require. Escaping output doesn't change that at all.



The reason for escaping output is evaluating untrusted data to avoid the hacker gaining that access in the first place.






share|improve this answer














If I were a hacker with access to the database, wouldn't I just add my code to a post's content?




I think your question answers itself. If you were a hacker with access to the db, then you've already gained the access you require. Escaping output doesn't change that at all.



The reason for escaping output is evaluating untrusted data to avoid the hacker gaining that access in the first place.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 13:06









butlerblogbutlerblog

2,21421328




2,21421328












  • Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

    – tmdesigned
    Mar 27 at 13:24

















  • Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

    – tmdesigned
    Mar 27 at 13:24
















Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

– tmdesigned
Mar 27 at 13:24





Thanks for your answer. I think I became too focused on the idea of preventing a hacker that I missed the forest for the trees.

– tmdesigned
Mar 27 at 13:24

















draft saved

draft discarded
















































Thanks for contributing an answer to WordPress Development Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f332740%2fwhy-escape-if-the-content-isnt%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bruad Bilen | Luke uk diar | NawigatsjuunCommonskategorii: BruadCommonskategorii: RunstükenWikiquote: Bruad

What is the offset in a seaplane's hull?

Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029