Can I word wrap a URL inside a HTML hyperlink - html

Is there a way to separate the URL name in a hyperlink so it continues onto the next line? In the application I am using I need to use a long URL and the space is limited so it wraps around to the next line. However, a space is automatically added to it and the link is then broken. Is there a continuation character to tell the application to keep link together or a way to use a shorter variable name that contains the longer actual URL?

No, HTML treats any and all whitespace characters (including multiple series of them) as a single space. You cannot disable this.

Is it absolutely necessary to put the URL as the hyperlink text?
In fact, showing a shorter meaningful description about the URL would be better for the hyperlink text.
meaning descr
I don't the actual requirement, but thought to leave this comment for you.

Related

Google App Script. How can i get hyperlink name?

Have troubles with extracting url from text in google document. I found method getLinkUrl(offset). It works fine, but if i for example add link not directly to text but via menu item Insert -> Link i can specify some name for link, for example name, that will be displayed in text will be StackOverflow and the link is https://stackoverflow.com, so when i use method getLinkUrl() i will get hyperlink but not the name. I need to get position of this link on text, so i need to get this word StackOverflow but i didn't find corresponding method for this.
Is someone know how i can get this word or its start and end indexes?
I know about attributeIndices property which contains indexes of starting of special formatting of text and it can be used in this case, but if link is last word in paragraph, there is no any more attribute index in this array, so i can not determine length of this word.
Would be appreciate for any advice)

how to add alter link in <a> tag in html

I'm implementing tag in my website. I load data from two different sources.
Because if one source(DB) is not available(not in connection), the data comes from second source(DB).
In this scenario, my tag have a two different link to reach for every page.
My doubt is if any possibility to add alter source in tag like img alt function
CODE
url // If source 1
url // If source 2
If possible to represent the above two link as below link,
url
No - generally, the alt attribute is for the purpose of showing alternative text. However, according to the specification the alt is not allowed in the anchor tags. Please see here.
You should use Javascript to replace the source if your run time environment matches conditions.
if (!url1)
document.getElementById('#my-anchor').href = url2;
If using twig template, use conditional operator to resolve this problem,
For example,

How to show special character in UTF-8 of Kmer symbol

I have got ឴symbol, that i can't display on web page (utf-8) content type. This symbol without width and can't see at all. How to show it? Code is ឴
for example here http://www.endmemo.com/unicode/khmer.php 6068 and 6069 are not visible, but i need to show it, at least space
Edited:
I'm using Arial or sans-serif. I think, that it is pretty usual fonts. What people do: they making UNIQUE text by inserting this symbol inside usual symbols. For example, user write: "a(invisible symbol of kmer)b(invisible symbol of kmer)" and so on. I see on page only "ab" without any spaces. I tried to put actual character inside html to see it, but with no luck. I thought that symbol, that is not present in font should be question mark or empty square, but not in that case. Solution can't just be simple replace in text.
If your page is UTF-8 then it's better to use the actual character rather than a HTML entity.
Your requested character is not present in many fonts. You can try finding the latest version of Code2000 which appears to support it.
You can see fonts that support this particular character here:
http://www.fileformat.info/info/unicode/char/17b4/fontsupport.htm
If you can't find a font and you want to display an empty space instead you could replace it before showing it in the page or put it in a container. The page you linked uses a table cell to hold the character.

UIWebview URL handling

I have a UIWebview wherein I feed different kinds of text like links, simple text, emoticons. It is customize that it will chop a long link into several chunks for eg.
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash3/s480x480/525188_10200372945753969_1256081282_n.jpg
into
https://fbcdn-sphotos-</BR>
d-a.akamaihd.net/hphot</BR>
os-ak-ash3/s480x480/52</BR>
5188_10200372945753969</BR>
_1256081282_n.jpg
I tried removing the method that chops it into several chunks but this is what I get...
https://fbcdn-sphotosd-
a.akamaihd.net/hphotos-ak-
ash3/s480x480/525188_10200372945753969_1256081282_n.jpg
The link is full and working, however on the UI it doesn't display correctly, if only it would automatically create a new line without breaking the link...
So the problem is that because there is a trailing html element the link automatically gets broken my question is...
Is there a way to handle such scenario wherein I can include the HTML element tags into the link yet doesn't break the link or better yet just make the long link display correctly?

Save free form description along with spaces and line breaks

I'm sure there must be a lot of posts answering my query, but I am just not able to find the correct post.
In my application user is entering free from description in the text area. but when data is saved and displayed on the next page, entire text is wrapped in to single para. I want whole text to be saved as user enters it along with line spaces and newlines, tabs etc.
please redirect me to correct post. Do i have to save textarea as blob?
Thanks
Your problem is that the text is entered in plain text, however, in HTML, extra spaces are removed, and all sorts of space are just displayed as a single space character. You have to either display the text in a <pre></pre> tag (ugly way) or reformat it using regular expression or other string processing methods to make an actual HTML.