question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SPF.js doesn't return responses when we have multiple lines!

See original GitHub issue

SPF.js doesn’t work with this:

<link rel=\"stylesheet\" href=\"css/style1.css\">
<link rel=\"stylesheet\" href=\"css/style2.css\">
<link rel=\"stylesheet\" href=\"css/style3.css\">

But if I put all lines into one line it works fine. Like this: <link rel=\"stylesheet\" href=\"css/style1.css\"><link rel=\"stylesheet\" href=\"css/style2.css\"><link rel=\"stylesheet\" href=\"css/style3.css\">

Why SPF.js doesn’t work in multiple lines?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kamravacommented, Apr 25, 2017

Thank You, I’ve provided a Laravel Package. laravel-spfjs 😃

0reactions
PhilHarnishcommented, Apr 23, 2017

Yes, same issue.

If “users-list/head.php” contained this:

line 1
line 2
line 3

You would end up with this output:

{
  "head": "line break 1: 
line break 2: 
line 3",
  "body": {
  ...

Which is also invalid JSON (see “string” section of JSON definition). If you’re able to find a method to load a file in PHP and escape use the “addslashes” method it will also convert newline characters to something acceptable for a JSON string (which is the 2-character string “\n”).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use JavaScript regex over multiple lines?
I 'd want the PRE block be picked up, even though it spans over newline characters. I thought the 'm' flag does it....
Read more >
Configure SPF or TXT records that are longer than 255 ... - AWS
How can I configure sender policy framework (SPF) or text (TXT) records that are longer than 255 characters in Amazon Route 53?
Read more >
Making decisions in your code — conditionals - MDN Web Docs
Conditional statements allow us to represent such decision making in JavaScript, from the choice that must be made (for example, "one cookie or ......
Read more >
How to Send Emails with PHP Mail() Function and PHP Mailer
The SMTPDebug = 2; line is only applicable when you test a script and want to see how it operates. Remember to change...
Read more >
Common errors and difficulties faced in ADOBE FORMS ...
While creating my first ADOBE FORM I have faced many errors and as a ... we should check the “NO ERROR IF TEXT...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found