Avoid Url to be treated as hyperlinks in Rails Mailer - ruby-on-rails

I'm sending a mailer to users that includes a link to their created post.
This link should be for copying and pasting only, however it delivers automatically as a blue underlined hyperlink.
Any suggestions?
Thanks
<td width="440" height="50" bgcolor="#f5f5f5" style="border:1px solid #e3e3e3; display: block; margin:40px auto;">
<div style="color:#666f67; font-size:16px; font-weight: 400; font-family:sans-serif; text-decoration: none; display:block; text-align:center; padding: 16px;">
url
</div>
</td>

The Bootstrap library is not included in emails as it would be in regular views. If you need to format emails, you'll have to do it inline. For example:
hello
Checkout Mailchimp, they have great resources on how to create email templates.
I hope this helps.

I found another way for future reference, by placing it inside an input field "readonly."
<input type="text" value="www.mylink.com" readonly>

Related

Dynamic Images via Substitution Tag is not shown in E-mail

My E-mail with image module shows blank instead of the four images sent using substitution tag via dynamic templates. URLs are present in Original Message (Gmail), but images are not rendered.
What I've tried:
I've read & tried solutions provided in Can I have an image with a substitution tag in a SendGrid template?, but they do not show the images.
To troubleshoot my problem - I've placed the same substitution tag under text & image modules. Text module for {{images}} shows full URLs, and they do link me to the correct image upon clicking. However, the same {{images}} with exact URLs do not appear in my image module.
My image module HTML is as follows:
<td style="font-size:6px; line-height:10px; padding:0px 0px 0px 0px;" valign="top" align="center"><img class="max-width" border="0" style="display:block; color:#000000; text-decoration:none; font-family:Helvetica, arial, sans-serif; font-size:16px; max-width:100% !important; width:100%; height:auto !important;" width="600" alt="" data-proportionally-constrained="true" data-responsive="true" src="{{images}}"></td>
SendGrid Image for Reference
Original Message from Gmail

Angular Material: Change font-size of <mat-list-item>

I am using Angular Material. I have a form with various fields and list items. I have changed the size of mat-form-field inputs using below
mat-form-field.mat-form-field {
font-size: 14px;
}
However since list are not a part of mat-form-field they are still their default 16px. How can I change the size of the <mat-list-item>?
<mat-list-item *ngFor="let file of files">{{file.name}}<mat-list-item>
Try the following CSS definition:
:host /deep/ .mat-list-item-content {
font-size: 18px;
}
I was actually doing this yesterday for my mat-list-items. h6 turned out to be an appropriate size for me.
<mat-list-item *ngFor="let file of files">
<span style="font-size:12px">
{{file.name}}
</span>
<mat-list-item>
or
<mat-list-item *ngFor="let file of files">
<h6>
{{file.name}}
</h6>
<mat-list-item>
You can add the styling directly to the markup. If you use class to reference CSS file, sometimes it won't work.
<mat-list-item style="font-size: 14px; height: 25px" >Test</mat-list-item>

Firebug shows incorrect (possibly hijacked) link CouponDropDown

This is the first time I saw this... I have text in my code and it says Passport and Visa Requirements. This is my markup
<div class="rectangle"><span>Passport and Visa Requirements</span></div>
Crazy thing happens on the live server, somehow a link is injected on the word "visa". This is the markup I see in firebug.
<div class="rectangle">
<span>
Passport and
<a id="_GPLITA_0" title="Click to Continue > by CouponDropDown" style="text-decoration:underline" href="http://i.txtsrving.info/click?v=" in_rurl="http://i.txtsrving.info/click?v=" in_hdr="">
Visa
<img src="http://cdncache1-a.akamaihd.net/items/it/img/arrow-10x10.png" style="display: inline; vertical-align: super; margin: 0px 0px 0px 3px; padding: 0px; border: 0px none; height: 10px;">
</a>
Requirements
</span>
</div>
Is my htaccess file not configured properly? How do I deal with this? Is this a security issue?
http://www.bleepingcomputer.com/virus-removal/remove-coupondropdown
This is probably adware on your computer, affecting your browser. Your website is probably fine.

Tinymce error : special effects not working in browser

I added tinymce to my active-admin so I could format large text areas. It works great, I can add effects and save that model. But when I go to browser it just shows html code like this :
<p>Aizaugušu lauksaimniecības zemju apstrāde ar Ahvi zemes frēzi.</p> <p><span style="color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px;"><strong>In Microsoft Office OneNote 2007</strong>, you try to send a note to a mail recipient as an attachment. After you do this, the following text is unexpectedly inserted in the body of a new e-mail message:</span></p> <div class="message" style="margin: 0px; padding: 10px 30px; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px;"><strong>Click the OneNote</strong> attachment if you want to view or edit the notes in OneNote. If you don't have OneNote 2007, you can click the second attachment to view the notes as a Web page.<br /><br />You can download a free OneNote trial version from: `http://r.office.microsoft.com/r/rlidOneNoteTrial?clid=1033&ver=12&app=onenote.exe&p1=12
Instead off text with specified effects.
That is because some Javascript error?
Thanks :)
This is probably due to the content being escaped before it is rendered in your view. Rails does this automatically as a safety precaution. In your view you probably have something like this:
<%= #model.content %>
Try turning off the escaping by doing:
<%= #model.content.html_safe %>
Hope that helps!

content not showing in text area?

I have a textarea and for some reason when I try to add text in between the open and close brackets of my textarea it wont display, whether I use html content or php echoed content.
It works if I place the content in a place holder though, does anyone know why this is happening?
<form action="includes/changebio.php" method="post" id="form1">
<textarea id="bio" style="width: 440px;
margin-top:3px;
text-align:left;
margin-left:-2px;
height: 120px;
resize: none;
outline:none;
overflow:scroll;
border: #ccc 1px solid;"
textarea name="bio" data-id="bio"
maxlength="710"
placeholder="<?php echo stripslashes($profile['bio']); ?>" rows="10">
</textarea>
<input type="image" src="assets/img/icons/save-edit.png"
class="bio-submit" name="submit" value="submit" id="submit"/>
</form>
Try adding a name="textarea-name"attribute to the textarea (even if you have no use for it)
Edit:
I have tested a <textarea name="bio">textarea content</textarea> piece of code and concluded that (as strange as it may seem), if the textarea name is bio, the content is no shown in Firefox, although it is present if the element is inspected with Firebug or a similar tool.
It appears to be something caused by one of my add-ons, as the textarea content it is displayed correctly by other browsers and when using a clean new Firefox profile.
I have not investigated further though.
Simplest method that worked for me:
Instead of doing:-
<textarea name="scenario" value="<?php echo $scenario?>"> </textarea>
Do it like this:-
<textarea name="scenario"> <?php echo $scenario?> </textarea>
I have similar problem! When I change the content with ajax, Chrome & Firefox displayed nothing, but IE displayed correctly. What strange is the content is present if the element is inspected with Firebug or a similar tool.
You have extra textarea after style tag. Here is the code.
<form action="includes/changebio.php" method="post" id="form1">
<textarea id="bio" style="width: 440px;
margin-top:3px;
text-align:left;
margin-left:-2px;
height: 120px;
resize: none;
outline:none;
overflow:scroll;
border: #ccc 1px solid;" name="bio" data-id="bio" maxlength="710"
placeholder="<?php echo stripslashes($profile['bio']); ?>" rows="10"><?php echo stripslashes($profile['bio']); ?></textarea>
<input type="image" src="assets/img/icons/save-edit.png"class="bio-submit" name="submit" value="submit" id="submit"/>
</form>
I also faced the similar problem and resolved it by doing like this:
{{\App\ArtObject::find($id)->description}}
Earlier I had:
description}}">
The later case did NOT show the value as expected.
If your problem is same as mine, where I placed a string variable with 1500 chars for a web content, between the two tags, and only partial appeared inside the Textarea on the page. Only about 900 chars displayed. A large part at the end were missing. Then, you may try what worked for me, where I used the htmlspecialchars() function like this:
<TEXTAREA><?php echo htmlspecialchars($pgCont); ?></TEXTAREA>
I still don't know why this function may be required to show the full contents of the string variable. Perhaps, for security reasons.

Resources