Drupal: How to format email message using node invite module? - drupal

I am using the node invite and token module.
I have followed this flash tutorial video: http://www.adevbox.com/files/2008-06-25_1703.swf
My problem is regarding the email format being sent.
In the ?q=admin/settings/node_invite
I have checked the blog entry checkbox. Now the node invite works but I can't format my body section value correctly.
For example:
I entered in the textarea
Hi <bold>
Then the result when I open the email message is still the same:
Hi <bold>
Same with if I use <b>bold here</b> then it will also be the format when I open the email message.
How can I format it correctly? Am I missing something simple? I am thinking of using htmlspecialchars but I don't where to put it.
Thanks in advance :)
Kind Regards,
Mark

My understanding of the Invite module is that there is no Input Filter for the template. This means that the only format that is accepted is plain text. This means that it will convert HTML into the escaped code you see.
You can validate this looking at the variables in the database. Your best bet it so path Invite (or ask for a features) to allow HTML as a valid format.

Related

Feed RSS and <author> tag with fake emails

In the feed rss I can add the tag .
But to add it I have to add also an email.
For example
<item>
<title>My RSS</title>
<link>https://www.mywebsite.com/xml/xml_rss.asp</link>
<description>Item One</description>
<author>mark#mywebsite.com (Mark)</author>
</item>
i can not add ONLY the name of the author but it requiered also the email. So...What happens if I add a fake email?
P.s. I already know that with atom system I can add also only the name, but I prefer to use the "rss way"
What happens if I add a fake email?
I don't think there are any surprises here: if a client uses that email address to contact the author, the message won't arrive.
If the email address is syntactically valid, and a plausible value, people may use it without realising this.
Providing an invalid value just to make the feed syntactically valid isn't always a good idea. It may be better to omit the field.

strange text when extract the body of email from Gmail using IMAP

iam using QT and Qsslsocket to get some emails body from Gmail using IMAP, I started using the IMAP command to log in, check how many emails I have, and fetch the data from the email I selected I use this commands sure after connected to IMAP using hostname and port.
tag login username password
after login and check the number of messages using tag select inbox I use this command to extract the body of the email.
tag fetch message_number (body[1])
the problem is i got very strange words like this
* 5 FETCH (BODY[1] {1856}
SGkgRmVsaXggYW5kIEZpbmdlcnMgRHVlbGluZyBQaWFub3MsCgpWaWN0b3JpYSBBLiBoYXMg
dXBkYXRlZCB0aGVpciBldmVudC4KClRoZSBwZXJmb3JtYW5jZSBsZW5ndGggaGFzI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bSBodHRwOi8vdHJhY2tpbmcuZ2lnc2FsYWQuY29tL3RyYWNraW5n
L2NsaWNrP2Q9eEMzVEhBbjgyRTZuZ2piQXN6ZHRRVWZQcktNTVAwbDBpbzl0UDgxOW5SazBC
WDdvZmdZLU1OVk1jR2owTXdWQTNhZmV5aUh1T2VBSUE0V0tTM1NLZnU4Wk1nMENJRmszdnR3
X0F4Q1M2aWdiMDdCazBsU0p4QWNQYlJpc19uaFpNdzIKCgpTdG9wIGFsbCBHaWdTYWxhZCBl
bWFpbHMgKG5vdCByZWNvbW1lbmRlZCk6Cmh0dHA6Ly90cmFja2luZy5naWdzYWxhZC5jb20v
dHJhY2tpbmcvdW5zdWJzY3JpYmU/bXNnaWQ9UzQzLVFsVDVBbHhiaUl0SmhxU0NuZzIKCsKp
IFRoZSBHaWcgQnVyZWF1LCBMTEMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFBlYWNlLCBsb3Zl
ICYgZ2lnc8KuIGlzIGEgcmVnaXN0ZXJlZCB0cmFkZW1hcmsgb2YgVGhlIEdpZyBCdXJlYXUs
IExMQy4KMjczMyBFLiBCYXR0bGVmaWVsZCBSZCAjMTA1IFNwcmluZ2ZpZWxkLCBNTyA2NTgw
NA==
)
but the email contains normal message have normal words the strange is when i test with another gmail, i take this email from first email and send it forward message to my second email, it give me the normal text in it! so please any help i can't understand what is the problem, also what i tried is using openssl which give me same result as QT strange words, and javaMail library and extract text from first email it worked? so is the problem from the imap command i used or what?
Thanks in advance.
this a screenshot of the email message
Update
when i start some search i checked that this message is encoded to base64 and when i used online decoder it convert to the normal text but the question now is what command should i use so that i can fetch this message body text in normal text automaticly if there is such away.

Should in encode id in Edit and Update Operation

I am making a simple crud operation in Spring and hibernate Project. when i click in edit my Url is edit/{id} and for update is update/{id}.The id is primary key,auto generated which was save in database like 1,2,3...
I want to know that id should be encoded or not in html page.Can anyone help me.
If you want to provide security
Encode the id use Base64.
Encoded id return to front
When click to edit the id will come to controller
Then you can easily decode it.
No need to encode the ID.
Its okay to keep it as it is.
If you are afraid of security then apply security on method or application level.

How to input email and password for PayPal using Selenium2Library?

I am trying to input email and password into PayPal (sandbox mode) using my Robot Framework script. This is a snippet of my code:
input text login_email ${email}
input text login_password ${password}
login_email is the name of the input field for the email and login_password is for the password.
I am passing the email in the ${email} argument and the password in the ${password} argument.
This doesn't seem to work for some reason. I keep getting this error:
InvalidElementStateException: Message: Element is not currently interactable and may not be manipulated
The email and password field for PayPal are generated upon the loading of the page. Can that be a reason why they are not accessible? Can anybody help me identify what am I doing wrong here?
As Correctly said by Ofer Steinberg , try to find the XPATH manually
Also, add a wait point until that item is visible and the enter name and password
as many times item is present and hidden due to which it says item not interactable.
It seems you have there a 'not constant' id (or similar..).
I had this problem, and the solution was to change the input path from id to xpath.
Moreover, try to inspect the paths manually in 'guest mode' (I guess you using chrome), it should show that page source more accurately since the selenium running by it.

Drupal: Edit !name variable in my Drupal to first name?

I’ve a bit of annoying problem with a Drupal site. I’ve a “recommend to a friend” field where one can send an article link to an E-mail address. The problem is, that it uses the variable !name in the mail and when I’m receive a mail, it uses the name before the “#” in my mail.
I use my mail as username, so if I’ve registered a user with the username: johndoe#google.com it will present the !name variable as johndoe.
What I want is to display the first name (and maybe the last name) so it says: John Doe recommends this article …
But how can I do that? I’ve search like crazy for the setting.
Thanks
Sincere
- Mestika
To replace user names in quotes by reals names it's necessary to replace Phorum´s standard function for quoting. Since it only makes sense to have one module modifying the quoted text, you can disable this one part of this module. Use System Sanity Checks to control if there is only one module using the quote hook. The default value is "disabled".
TUV Rheinland of North America
You could also try the Custom Tokens module. I use it to get text from my user's Content Profile.

Resources