Wikipedia has it right. An accidental that is written in, as shown in the example above, only applies to the note in that octave until the end of the measure.
You may be confusing it with the accidentalssharps and flats in the key signature which do apply to every octave. It's also possible that in the pieces you are playing you are seeing a courtesy accidental instead of an actual accidental. Courtesy accidental are unnecessary, but are typically deemed helpful for the reader.