How to Make Mark-Up Appear as Text

User avatar
BobH
UraniumLounger
Posts: 9291
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

How to Make Mark-Up Appear as Text

Post by BobH »

    
If I'm posting on a forum that allows mark-up tags or some sub-set of them, how do I frame the mark-up tags to make them appear as text?

I tried 'Net searches but my search fu is failing far and fast.

:cheers: :chocciebar: :thankyou:
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: How to Make Mark-Up Appear as Text

Post by Rudi »

    
You need to use the Escape BBCode tag (the t tag in the advanced reply window)
20180417_208.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78509
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to Make Mark-Up Appear as Text

Post by HansV »

Keep in mind that [t]...[/t] is specific to Eileen's Lounge; it won't work on most other forums.

Another trick that should work on most forums is to format the square brackets of tags differently from the rest of the text: in the following, I made the square brackets bold.

[i]Italic text[/i]

The formatting prevents the tags from being recognized.
Best wishes,
Hans

User avatar
BobH
UraniumLounger
Posts: 9291
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Re: How to Make Mark-Up Appear as Text

Post by BobH »

Thanks guys!

First, thank you, Rudi, for placing the post where it belongs. I was hoping for a more universal solution than one that is used by Eileen's Lounge; thus I was wary of posting there. Although I doubt there is enough interest and would garner too few posts, I was looking for a forum titled, "Using Mark-Up Tags".

Second, my question was triggered by the desire to post on another forum using phpBB. Would the solutions you two proposed work on any phpBB forum or is there something special the the Eileen's configuration?
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs

User avatar
HansV
Administrator
Posts: 78509
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to Make Mark-Up Appear as Text

Post by HansV »

The [t]...[/t] tags were created by me, so they are not standard phpBB3.
The trick of formatting the square brackets (making them bold, or blue, or ...) should work in most or all forums that use BBtags (not just phpBB3).
Best wishes,
Hans

User avatar
BobH
UraniumLounger
Posts: 9291
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Re: How to Make Mark-Up Appear as Text

Post by BobH »

Thank You, Mr. V!!!
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs

User avatar
Argus
GoldLounger
Posts: 3081
Joined: 24 Jan 2010, 19:07

Re: How to Make Mark-Up Appear as Text

Post by Argus »

Didn't have time to post earlier, before it was moved, and I see that you've got some alternatives (though a tag created for this forum is of course limited to the Lounge). (Great work of our admins.)

I haven't used it (some variant of "escape code") in quite some time; it's possible that I've used the t-tag here, but :whisper: there is another "secret" trick I know that I have used, for example here.

You can type a non-printable character after the first bracket of the code. In this case I used one in the extended ASCII, Alt-240.

[­b]Bold[/b]
[­i]Italic[/i]
[­url]http://www.eileenslounge.com[/url] (An extra step here, since, as most know, there is no need for an URL tag get a live link. But it works without the BBCode. :grin:
­http://www.eileenslounge.com

A bit unorthodox, but very clean (and quick to type). Probably breaking something now. :laugh: :hiding:
Byelingual    When you speak two languages but start losing vocabulary in both of them.

User avatar
HansV
Administrator
Posts: 78509
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to Make Mark-Up Appear as Text

Post by HansV »

You're not breaking anything - but Alt+240?
Best wishes,
Hans

User avatar
Argus
GoldLounger
Posts: 3081
Joined: 24 Jan 2010, 19:07

Re: How to Make Mark-Up Appear as Text

Post by Argus »

Yes. Alt+240.
Byelingual    When you speak two languages but start losing vocabulary in both of them.

User avatar
HansV
Administrator
Posts: 78509
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to Make Mark-Up Appear as Text

Post by HansV »

Alt+240 produces ≡ when I type it...
Best wishes,
Hans

User avatar
Argus
GoldLounger
Posts: 3081
Joined: 24 Jan 2010, 19:07

Re: How to Make Mark-Up Appear as Text

Post by Argus »

Well, yes; for a start, it (the congruence symbol) is not part of the non-printable control characters in ASCII (0-31, 127); with that example I should have put quotation marks on non-printable. As I mentioned it is part of the extended ASCII, and then it (what we get) depends on which code page you and I use.
http://jkorpela.fi/chars.html" onclick="window.open(this.href);return false;

This makes it shaky ...
Do you see the BBCode in my post above? Or is there a "hamburger" (inside of the code)? :burga:
Byelingual    When you speak two languages but start losing vocabulary in both of them.

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: How to Make Mark-Up Appear as Text

Post by Rudi »

Argus wrote:Do you see the BBCode in my post above? Or is there a "hamburger" (inside of the code)?
Nope. No burga!

It looks exactly like this in the BBCode:
[­b]Bold[/b]
(just copied and pasted!)
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78509
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: How to Make Mark-Up Appear as Text

Post by HansV »

Apparently your Alt+240 is translated to some "invisible" Unicode character...
Best wishes,
Hans

User avatar
Argus
GoldLounger
Posts: 3081
Joined: 24 Jan 2010, 19:07

Re: How to Make Mark-Up Appear as Text

Post by Argus »

HansV wrote:Apparently your Alt+240 is translated to some "invisible" Unicode character...
Yes, and that was the point of the exercise; to add something not printed, "breaking" the BBCode syntax, similar to adding BBCode to the brackets, in this case something not rendered by the browser.

For some reason Alt+240 and U+2261 (i.e. the symbol, glyph, you posted; "triple bar", "identical to" "iff" etc, not the congruence symbol, as I mentioned earlier) are linked, and I knew that before I posted; but not how.

Character encoding for computers, uhm, let's just say I'm happy when it works, as it does nowadays (compared to say the early days of the 90s). Can be a confusing mess.

Some words about encoding:
"But look at it," the Europeans said, "in a common computer with 8 bits to the byte, ASCII is wasting an entire bit which is always set to 0! We can use that bit to squeeze a whole 'nother 128 values into that table!" And so they did. But even so, there are more than 128 ways to stroke, slice, slash and dot a vowel. Not all variations of letters and squiggles used in all European languages can be represented in the same table with a maximum of 256 values. So what the world ended up with is a wealth of encoding schemes, standards, de-facto standards and half-standards that all cover a different subset of characters. Somebody needed to write a document about Swedish in Czech, found that no encoding covered both languages and invented one. Or so I imagine it went countless times over.
:grin:

Back to the "hidden" character; I think it is a soft hyphen.
Based on Wiki; in ISO 8859-1, i.e. Latin 1, (an 8-bit, extension of ASCII) the soft hyphen had position 0xAD. And yes, if I type Alt-240 in MS Word, then press Alt-x, it tells me it is 00AD, or 0xAD. In, for example, IBM Code page 850 (DOS char. set equal to ISO 8859-1) it had position 240 = 0xF0; but in Unicode that's ð (lowercase eth), sigh.

Then in Unicode 1.0 soft hyphen was at codepoint U+00AD in the Unicode table.

So, perhaps anyone that can't use Alt-240 as mentioned above, after the first bracket, could try Alt-0173.
Bold text
[b­]Bold text[/b] (Alt-240)
[b­]Bold text[/b] (Alt-0173)

When I said perhaps "breaking" things etc, I knew it worked here, but that soft hyphen has been used for different malicious intents.
https://threatpost.com/spammers-using-s ... 710/74558/" onclick="window.open(this.href);return false;
http://jkorpela.fi/shy.html" onclick="window.open(this.href);return false;
Byelingual    When you speak two languages but start losing vocabulary in both of them.

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: How to Make Mark-Up Appear as Text

Post by Rudi »

Interesting post.
TX Argus :cheers:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
BobH
UraniumLounger
Posts: 9291
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Re: How to Make Mark-Up Appear as Text

Post by BobH »

Argus, hate to be pest but could you show me the exact way you would type the URL using Eileen's Lounge as the hyperlink? I think there is something I haven't yet glommed onto.
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs

User avatar
Argus
GoldLounger
Posts: 3081
Joined: 24 Jan 2010, 19:07

Re: How to Make Mark-Up Appear as Text

Post by Argus »

OK BobH, as an example I'll use an explanation how to use BBCode to make some text a live link. It's really simple as we know, but it can be difficult to show how the code looks, hence escape tags, created by Hans, that works in this Lounge, or something else.

I'll use this example: Sample text. Some text here, some text here. :grin:

An URL can be pasted directly into the BBCode, but it can sometimes be easier to paste it somewhere in the editor if one has to trim some part of the URL.

So, in the editor we see:
Sample text. Some text here, some text here.
­https://www.eileenslounge.com

I then highlight "some text", click on the URL button (there are explanations for BBCode syntax in the tooltips).
Sample text. Some text here, [­url]some text[/url] here.
­https://www.eileenslounge.com

I then move the URL into the BBCode, and add "=".
Sample text. Some text here, [­url=https://www.eileenslounge.com]some text[/url] here.

Result:
Sample text. Some text here, some text here.

Now, it would have been difficult to show the BBCode behind this, since only the result will be posted. In the example above I added Alt-0173 after the first square bracket (and on the second line before the URL), i.e. a soft hyphen that won't be rendered by the browser; you won't see it (unless you copy my reply from the editor to, for example Notepad).

Sample text. Some text here, [-url]some text[/url] here.
https://www.eileenslounge.com

Using an URL as an example how to "escape" the BBCode is a bit special, compared to, say, the BBCode for Bold. Today most software can automatically parse URLs, make them live (there is a check box in the editor to disable that). You don't need to highlight ­www.eileenslounge.com and click on the URL button to add the tags for it to become http://www.eileenslounge.com" onclick="window.open(this.href);return false;. And also, if there isn't something that can be parsed as an URL when using the BBCode for URL nothing will happen, no link. In the example above, before adding the URL, there was no need for me to add something that "breaks" the BBCode since it will look like some text.

As mentioned above, using soft hyphens, in general (i.e. not to break BBCode :grin: ), is perhaps questionable.
Another source of confusion is that some programs implemented the Unicode semantics for the soft hyphen, but many widely used text editors and word processors did not. Instead, program-specific methods were used for discretionary hyphen. This resulted in problems in data interchange, making the use of soft hyphens questionable.
So, a little "quick & dirty" trick that I've used (in another context). I linked to an old post above, here is another older one; and as we know there are some (very) minor errors in some old posts due to some server update. In this case I used a non-printable character at both opening and closing tags. Now rendered as ­.
Byelingual    When you speak two languages but start losing vocabulary in both of them.

User avatar
BobH
UraniumLounger
Posts: 9291
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Re: How to Make Mark-Up Appear as Text

Post by BobH »

Thank you, Argus!

That really helped!!!

:cheers: :chocciebar: :thankyou:
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs