Problem with hot links in news posts

I have had a problem creating hot links in news posts.

What happens is that, in the editor, I use the html tag ‘a href’ to specify a webpage to which the reader should be taken when clicking on the subject term(s) but when I publish, the text “https://online-go/group” is affixed to the front of the specified page url.

I asked a mod I know to help look into this via private messaging, and he kindly set up a test group, making me a member and admin. I tried to demonstrate the problem with a one-line news post containing a hot link but in this case, it worked just as it should and didn’t append the unwanted material to the specified url.

Today, I tried again with a different post, linking the words “Round Robin” to the Sensei’s library page on the subject and had the same problem. When the post was published, the hot-linked words were highlighted in blue, as expected, but clicking on them didn’t deliver me to the page. When I investigated, I found that a ‘link’ had been created with “Play Go at online-go.com! | OGS” appended to the front of the link actually specified.

I have no idea why hot-linking worked perfectly in the test group but screws up in my real group. Tricky problem. I have just had to do without the hot links for now.

Please don’t try to tell me how to use a href. I have created hundreds of links using it, including the one directing to our Club webpage in the Group description. I checked and double-checked what I had written in the editor and, of course, it did not include the string “https://online-go/group” anywhere.

Weirdly, the first time I wrote h-t-t-p-s-:-/-/-o-n-l-i-n-e-g-o-.-c-o-m-/-g-r-o-u-p it came out in blue and the second time wrote “Play Go at online-go.com! | OGS”.

It is very difficult to talk about html where html is used!

1 Like

Try using back ticks:

`<div>Some HTML</div>`

shows up as <div>Some HTML</div>

2 Likes

Thanks very much. I thought there had to be a way. My html is very basic. When I get time, I will redraft the post in the light of your teaching.

I will also carry out some tests to try and work out why hot-linking worked in Tom’s test group but doesn’t in my real group. I appreciate it is hard for anyone to look into a problem which apparently can’t be duplicated.

1 Like

Enclose in 3 back ticks followed by the programming language to get the code highlighted: ```html

<div>Some html</div>
1 Like

This is not quite clear, I’m afraid

Like this:

```html
<div>Some html</div>
```
2 Likes

In flovo’s example, the 'div’s came out in red, but not in yours, so where’s the “highlighting”?

@Feijoa put the whole thing in FOUR backticks, thus simply quoting again, so as to show you the code that @flovo used above.

````
```html
<div>Some html</div>
```
````

(I had to put @Feijoa’s code in FIVE backticks to show you what they did.)

And the html part that tells the forum software’s code parser how to highlight needs to be right after the first group of backticks.

For example, the code to show this:

```html
<div>Some html</div>
```

… is this:

````html
```html
<div>Some html</div>
```
````

I wonder how deep such quotes can be nested …

I’m a little lost but the main thing is that I think benjito has given me the tool I need to explain my problem a bit more clearly.

Now I just need the time to do that …

No more html lessons for now please, but thanks to all who are trying to be helpful.

1 Like

My example

```html
<div>Some html</div>
```

was a lesson in forum formatting (Markdown), not HTML. So you wouldn’t really expect the HTML in there to be colored, and it might be misleading to do it.

But if you type it like that, you’ll get it colored nicely:

<div>Some html</div>

Here’s a screenshot of what I’m doing in case it helps:

1 Like

Markdown. Yes, thank you.

No more lessons please, just anything which might help solve the problem presented.

Cheers.

2 Likes

To clarify, in the news post editor, I write: <a href="https://senseis.xmp.net/?RoundRobin"Round Robin</a>. When I publish, this becomes Round Robin (or similar).

Just use markdown in the newspost

1 Like

I see. Thanks. I will look into it and try that.

1 Like

Equivalent markdown for the <a> tags you shared is:

[Round Robin](https://senseis.xmp.net/?RoundRobin)

Thanks, benjito. Will use that. Got a lot on my plate at the moment and it’s not urgent, but I will report back in due course.

1 Like

Using Markdown worked. Many thanks to you and others who contributed to solving this problem.

As a bonus, I have learnt about Markdown and realised it’s the system used in this forum for producing html.

I’m still curious about why using html directly didn’t work in my newsposts, even though it did in @trohde’s test group. Haven’t really got time to investigate further but if any coders are similarly curious and have time, they could try perusing the relevant code, albeit with no help about what distinguishes the cases.

1 Like

If you wrote

<a href="https://senseis.xmp.net/?RoundRobin"Round Robin</a>

as typed/pasted above

then it’s likely because there’s an angle bracket missing after the quotes for the link.

<a href="https://senseis.xmp.net/?RoundRobin"> Round Robin</a>

produces

Round Robin

< a href="some url" > ← this one some text to replace the url </a>

1 Like

Sorry, but that was just a typo, I’m afraid. I did include the closing bracket in the original.

I also made mistakes in my original exposition of the problem. The text in the editor, <a href="https://senseis.xmp.net/?RoundRobin">Round Robin</a> was actually rendered as if I had written <a href="https://online-go.com/grouphttps://senseis.xmp.net/?RoundRobin">Round Robin</a>. I misreported the surplus characters appended to the specified url.