Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected line break in style attribute value #63

Open
rafaelcamargo opened this issue Jul 28, 2016 · 3 comments
Open

Unexpected line break in style attribute value #63

rafaelcamargo opened this issue Jul 28, 2016 · 3 comments

Comments

@rafaelcamargo
Copy link

Hello folks!

Roadie Rails is an amazing tool, but I am facing this problem right now:
unexpected_line_break

<table align="left" border="0" callpadding="0" callspacing="0" class="btn-container-wrapper " style="border-collapse:collapse"><tr><td class="btn-container " style="color:#333;font-family:Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;text-align:left;line-height:120%"><table border="0" callspacing="0" class="btn btn-secondary is-small " style="width:200px;overflow:hidden;border-collapse:collapse;width:auto;text-transform:uppercase;color:#fff;text-decoration:none"><tr><td style='color:#333;font-size:13px;font-weight:400;text-align:left;line-height:120%;display:block;padding:8px 10px;width:auto;background-color:#ddd;font-family:Helvetica,Arial,sans-serif;text-align:center;line-height:initial;cursor:pointer;-webkit-box-sizing:"border-box";-moz-box-sizing:"border-box";box-sizing:"border-box";-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;padding-top:6px;padding-bottom:6px;background-color:#2C6CC6;color:#fff;text-decoratio
 n:none'><a href="http://jobscore-shorturls-staging.herokuapp.com/sbw" style="font-weight:400;outline:0;color:#2C6CC6;color:#333;color:#fff;text-decoration:none"><span class="btn-text" style="color:#333;font-family:Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;text-align:left;line-height:120%;font-size:12px;color:#fff;text-decoration:none">Prepare for the interview</span></a></td></tr></table></td></tr></table>

In the final HTML for my transactional email, it sometimes occurs and I am not able to find the reason for now... Any idea?

@Mange
Copy link
Owner

Mange commented Aug 1, 2016

I would expect this to be caused by some mail server/service somewhere in the chain. I don't think Nokogiri would cause this.

Does this happen to you when you don't send the email? In tests, for example.

@rafaelcamargo
Copy link
Author

Hey @Mange , thanks for your reply. I have discovered the reason just now. I am a beginner with Rails, so the code above was printed out by a helper. This helper had a lot of nested content_tag. A friend of mine looked at this and said to me: "Awful!". Extract this code into a partial. Doing so, the problem got solved. It apparently was caused for several nested content_tag. Using a partial it had not occurred anymore.

@Mange
Copy link
Owner

Mange commented Aug 2, 2016

Lovely! I'm glad you got it working again. 😀

Den mån 1 aug. 2016 20:48Rafael Camargo [email protected] skrev:

Hey @Mange https://github.com/Mange , thanks for your reply. I have
discovered the reason just now. I am a beginner with Rails, so the code
above was printed out by a helper. This helper had a lot of nested
content_tag. A friend of mine looked at this and said to me: "Awful!".
Extract this code into a partial. Doing so, the problem got solved. It
apparently was caused for several nested content_tag. Using a partial it
had not occurred anymore.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#63 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAGP-ZzwOB2l0sT9OAxpaGLWftpW1GGks5qbj-DgaJpZM4JXpPE
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants