Answers.Body: <p>Try wrapping your entry.url in quotes so JS reads it as a string. </p>
  
  <p><code>this.page.url = '{{entry.url}}</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-13T21:50:44.240Z
Answers.LastActivityDate: 2017-01-13T21:50:44.240Z
Answers.UserDisplayName: Aaron Berkowitz
Body: <p>Default Disqus embed code includes the following:</p>
  
  <pre><code>var disqus_config = function () {
      this.page.url =   // Replace PAGE_URL with your page's canonical URL variable
      this.page.identifier = {{ entry.section }}-{{ entry.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
  };
  </code></pre>
  
  <p>I am trying to use <code>this.page.url = {{ entry.url }}</code>.  This prints the url, but it includes the <code>http://</code> and the <code>:</code> is throwing an error preventing Disqus from loading.  Is there anyway to template the url without the http://????</p>
  
  <p>Note that the config I am using is straight from Disqus.  The CraftCMS knowledge base article does not include <code>this-page</code>.</p>
  
Tags: <templating>
Title: Templating - printing entry.url throws js error when trying to embed Disqus?
ThreadText: # Templating - printing entry.url throws js error when trying to embed Disqus?
  
  (Asked by: username_0 on 2017-01-13)
  
  Default Disqus embed code includes the following:
  
  ```
  var disqus_config = function () {
      this.page.url =   // Replace PAGE_URL with your page's canonical URL variable
      this.page.identifier = {{ entry.section }}-{{ entry.id }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
  };
  
  ```
  
  I am trying to use `this.page.url = {{ entry.url }}`. This prints the url, but it includes the `http://` and the `:` is throwing an error preventing Disqus from loading. Is there anyway to template the url without the http://????
  
  Note that the config I am using is straight from Disqus. The CraftCMS knowledge base article does not include `this-page`.
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-13. Score: 1 | Accepted answer
  
  Try wrapping your entry.url in quotes so JS reads it as a string.
  
  `this.page.url = '{{entry.url}}`
  
  
  ---
  
  